标签:
自己yy的算法,多棒啊是不是!!!
1 int n=100000,m=1000000; 2 write(n);PAU;write(m);ENT; 3 int i; 4 for(i=1;i<=m;){ 5 int last=1; 6 for(int j=1;i<=m&&j<=10;i++,j++){ 7 int now=rand()%n+1; 8 while(now==last) now=rand()%n+1; 9 write(last);PAU;write(now);PAU;write(rand()%100+1);ENT;last=now; 10 } 11 write(last);PAU;write(n);PAU;write(rand()%100+1);ENT; 12 }
标签:
原文地址:http://www.cnblogs.com/chxer/p/4537299.html