对拍
来源:互联网 发布:杨春秋软件俱乐部 编辑:程序博客网 时间:2024/04/26 14:06
对拍:
#include<algorithm>#include<iostream>#include<cstring>#include<cstdlib>#include<cstdio>using namespace std;signed main(void){ int num=0; while(1){ system("make.exe"); system("2752.exe <in.txt> out1.txt"); system("tijie2752.exe <in.txt> out2.txt"); if(system("fc out1.txt out2.txt")){ puts("WAAAAA!!!!!!"); while(1); } printf("# %d\n",++num); } return 0;}
造数据:
(此题是随机生成字符串)
#include<algorithm>#include<iostream>#include<cstring>#include<cstdlib>#include<cstdio>#include<ctime>using namespace std;char ch[1000],lala[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};signed main(void){ freopen("seed.txt","r",stdin); int seed; scanf("%d",&seed); srand(seed); rand();rand();rand();rand();rand();rand();rand();rand(); freopen("seed.txt","w",stdout); printf("%d\n",rand()); freopen("in.txt","w",stdout); int len=rand()%100+5; for(int i=0;i<len;i++) ch[i]=lala[rand()%26]; cout<<ch<<endl; return 0;}
by >o< neighthorn
1 0