SHARE
TWEET

Untitled

a guest Apr 19th, 2019 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <fstream>
  3. #include <random>
  4. #include <chrono>
  5. #define ll long long
  6.  
  7. using namespace std;
  8. ofstream fout("out.out");
  9.  
  10. int i,a,b,c,j,op,n,m;
  11.  
  12. int main() {
  13.    
  14.     mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  15.    
  16.     n=rng()%10+20;
  17.     m=rng()%10+20;
  18.     fout<<n<<" "<<m<<"\n";
  19.     for(i=1;i<=n;i++)
  20.     {
  21.         fout<<rng()%1000+1<<" ";
  22.     }
  23.     fout<<"\n";
  24.     for(i=1;i<=m;i++)
  25.     {
  26.         op=rng()%2;
  27.         a=rng()%n+1;
  28.         b=rng()%n+1;
  29.         if(a>b)
  30.         {   j=a;    a=b;    b=j;    }
  31.            
  32.         fout<<op<<" "<<a<<" "<<b<<" ";
  33.         if(op==1)
  34.         {
  35.             c=rng()%1000;
  36.             fout<<c<<" ";
  37.         }
  38.         fout<<"\n";
  39.     }
  40.    
  41.     return 0;
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top