Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <random>
- #include <chrono>
- #define ll long long
- using namespace std;
- ofstream fout("out.out");
- int i,a,b,c,j,op,n,m;
- int main() {
- mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
- n=rng()%10+20;
- m=rng()%10+20;
- fout<<n<<" "<<m<<"\n";
- for(i=1;i<=n;i++)
- {
- fout<<rng()%1000+1<<" ";
- }
- fout<<"\n";
- for(i=1;i<=m;i++)
- {
- op=rng()%2;
- a=rng()%n+1;
- b=rng()%n+1;
- if(a>b)
- { j=a; a=b; b=j; }
- fout<<op<<" "<<a<<" "<<b<<" ";
- if(op==1)
- {
- c=rng()%1000;
- fout<<c<<" ";
- }
- fout<<"\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement