#include using namespace std; vector a[1005]; bool mp[105][105]; int main() { srand(time(0)); freopen("in.txt","w",stdout); int n=rand()%100+2; int m=rand()%(n*3)+1; if(2*m>n*(n-1))m=n*(n-1)/2; printf("%d %d\n",n,m); for(int i=1;i<=m;i++) { int u=rand()%n; int v=rand()%n; while(true) { if(u!=v&&mp[u][v]!=true) { mp[u][v]=true; a[u].push_back(v); break; } u=rand()%n; v=rand()%n; } } int cnt=0; for(int i=0;i