题解:https://www.luogu.com.cn/blog/seztto/post-ti-xie-cf1268e-happy-cactus
复杂度似乎写假了,一个菊花图就可以卡掉(
gen:
#include<bits/stdc++.h>
#define int long long
using namespace std;
int n,m;
signed main(){
n=500000;m=499999;
cout<<n<<' '<<m<<endl;
for(int i=2;i<=n;i++)cout<<1<<' '<<i<<endl;
return 0;
}