标签:open int 不能 closed print pen rand 技术分享 splay
造树一定不能忘记啦!!!
1 for (RG int i=2;i<=n;++i) fa[i]=rand()%(i-1)+1 2 for (RG int i=1;i<=n;++i) y[i]=i; 3 for (RG int i=1;i<=n;++i) swap(y[i],y[rand()n+1]); 4 for (RG int i=1;i<=n;++i) printf("%d %d\n",y[i],y[fa[i]]);
标签:open int 不能 closed print pen rand 技术分享 splay
原文地址:http://www.cnblogs.com/Super-Nick/p/6681643.html