Advertisement
Dorijanko

gen

Feb 28th, 2024
971
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1. #include "testlib.h"
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main(int argc, char* argv[])
  7. {
  8.     registerGen(argc, argv, 1);
  9.     int n=opt<int>("n");
  10.     int v=(1<<29)-1;
  11.     int manu=1e9;
  12.     cout<<1<<endl<<n<<' '<<v<<endl;
  13.     for (int i=0;i<n-1;++i) cout<<rnd.next(1,manu)<<' ';
  14.     cout<<rnd.next(1,manu)<<endl;
  15.     int p=opt<int>("p");
  16.     bool sm=0;
  17.     for (int i=0;i<n;++i)
  18.     {
  19.         if (i==p-1) sm=1;
  20.         cout<<(1<<((i-sm)%29));
  21.         if (i<n-1) cout<<' ';
  22.         else cout<<endl;
  23.     }
  24.     int q=opt<int>("q");
  25.     cout<<q<<endl;
  26.     for (int i=0;i<q;++i)
  27.     {
  28.         if (i<q-1)
  29.         {
  30.             if (i%2==0) cout<<"1 "<<p<<' '<<(1<<((p-1)%29))<<endl;
  31.             else cout<<"1 "<<p<<' '<<(1<<((p-2)%29))<<endl;
  32.         }
  33.         else cout<<"2 1 "<<n<<endl;
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement