Augenbrauen

Generatorka

Jan 6th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. #define endl '\n'
  3. using namespace std;
  4. mt19937_64 gen__(chrono::system_clock::now().time_since_epoch().count());
  5. long long rd(long long a, long long b) { return uniform_int_distribution<long long>(a, b)(gen__); }
  6.  
  7.  
  8. int main()
  9. {
  10.     ios_base::sync_with_stdio(0);
  11.     cin.tie(0);
  12.    
  13.     int max_n, max_d;
  14.     cin >> max_n >> max_d;
  15.     int n = rd(1, max_n)
  16.     cout << n << endl;
  17.     cout << rd(3, 10) << endl;
  18.     for(int i = 0; i < n; ++i)
  19.         cout << rd(1, max_d) << endl;
  20.     cout << 1 << endl;
  21.     cout << rd(1, n) << endl;
  22.     cout << rd(1, n);
  23.  
  24.     return 0;
  25. }
Add Comment
Please, Sign In to add comment