Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- freopen("output.txt","w",stdout);
- srand(time(0));
- for(int l =0;l<100;l++)
- {
- int vertices = rand()%10 +1 ;
- cout<<vertices<<endl;
- for(int j=0;j<vertices;j++)
- {
- int e=rand()%10+1;
- int w ;
- (j==0)?w=0:w=rand()%200-100;
- cout<<w<<" "<<e<<" ";
- vector<int> v;
- v.resize(e);
- for(int c=0;c<e;c++)
- v[c]=c+1;
- for(int j=1;j<=e;j++)
- {
- int u=rand()%v.size();
- cout<<v[u]<<" ";
- v.erase(v.begin()+u);
- }
- cout<<endl;
- }
- }
- cout<<"-1"<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement