Guest User

generator

a guest
Jan 24th, 2017
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<algorithm>
  4. #include<vector>
  5. #include<cstring>
  6. #include<cmath>
  7.  
  8. using namespace std;
  9. #define MAX 100000
  10. #define MOD 100007
  11.  
  12.  
  13. int main()
  14. {
  15.   int t=100,n,a,b;
  16.   cout<<t<<endl;
  17.   while(t--)
  18.   {
  19.     //generate n a b
  20.     n=5+rand()%1000;
  21.     a=2+rand()%200;
  22.     b=5+rand()%a;
  23.  
  24.     cout<<n<<" "<<b<<" "<<a<<endl;
  25.     for(int i=0;i<n;i++)
  26.     {
  27.       cout<<(5+rand()%100000)<<" ";
  28.     }
  29.     cout<<endl;
  30.   }
  31. }
Add Comment
Please, Sign In to add comment