Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "testlib.h"
- #include <iostream>
- #include <cstdio>
- #include <cstdlib>
- #include <climits>
- #include <vector>
- using namespace std;
- const int n=1000000-1;
- vector <long long> v;
- int main(int argc, char *argv[])
- {
- registerGen(argc,argv);
- printf("%d\n",n);
- int k=rnd.next(1,10000);
- if (k%2==0) k++;
- long long r=rnd.next(1,INT_MAX);
- if (rnd.next(0,INT_MAX-1) & 1) r+=(long long)(rnd.next(1,1000))*(long long)(rnd.next(1,INT_MAX-1));
- for(int i=0;i<k;i++)
- v.push_back(r);
- while (k<n)
- {
- int c=rnd.next(0,999);
- if (c & 1) c++;
- if (k+c>n) c=n-k;
- r=rnd.next(1,INT_MAX);
- if (rnd.next(0,INT_MAX-1) & 1) r+=(long long)(rnd.next(1,1000))*(long long)(rnd.next(1,INT_MAX-1));
- for(int i=0;i<c;i++)
- v.push_back(r);
- k+=c;
- }
- shuffle(v.begin(),v.end());
- for(int i=0;i<n;i++)
- {
- #ifdef WIN32
- printf("%I64d",v[i]);
- #else
- printf("%lld",v[i]);
- #endif
- if (i<n-1) printf(" "); else printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement