#include<iostream>
#include<time.h>
using namespace std;
int main()
{
freopen("data.in","w",stdout);
srand(time(0));
int n=rand()%8+1;
int m=rand()%30+1;
cout<<n<<" "<<m<<endl;
for(int i=2;i<=n;i++)
{
int fa=rand()%(i-1)+1;
cout<<fa<<" "<<i<<endl;
}
for(int i=1;i<=m;i++)
{
int op=rand()%2;
if(op==0)
cout<<op<<" "<<rand()%n+1<<endl;
else
cout<<op<<" "<<rand()%n+1<<endl;
}
}
如果拍不出来建议m调大一些