The5threic1-1

Cali_region_gen

Apr 22nd, 2024
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.78 KB | Source Code | 0 0
  1. #include<bits/stdc++.h>
  2. #define endl '\n'
  3. using namespace std;
  4. #ifdef  ONLINE_JUDGE
  5.     #define eprintf(...) 42
  6. #else
  7.         #define eprintf(...) {fprintf(stderr, __VA_ARGS__);fflush(stderr);}
  8. #endif
  9. clock_t startTime;
  10. double getCurrentTime()
  11. {
  12.     return (double)(clock() - startTime) / CLOCKS_PER_SEC;
  13. }
  14. mt19937_64 gen(chrono::steady_clock::now().time_since_epoch().count());
  15. const int N = 100000;
  16. int solve()
  17. {
  18.     uniform_int_distribution<int> rnd(1, 1e9);
  19.     cout<<N<<endl;
  20.     for(int i=0; i<N; i++)
  21.     {
  22.         cout<<rnd(gen)<<" ";   
  23.     }
  24.     cout<<endl;
  25.     return 0;
  26. }
  27. int main()
  28. {
  29.     ios::sync_with_stdio(false);
  30.     cin.tie(0);
  31.     int t=1;
  32.     //cin>>t;
  33.     startTime = clock();
  34.     while(t--)
  35.     {
  36.         startTime = clock();
  37.         solve();
  38.     }
  39.     eprintf("time = %.5lf\n", getCurrentTime());
  40.     return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment