普通对拍器:
duipai.cpp:
#include<bits/stdc++.h>
using namespace std;
int main()
{
unsigned long long i=0;
while(1)
{
i++;
system("Randomdata.exe > in.txt");
if(system("ans.exe < in.txt > ans.txt")!=0)
system("color f"),printf("emm,This data is illegal\n"),exit(0);
if(system("yours.exe < in.txt > yours.txt")!=0)
system("color d"),printf("Run time Error on test %llu\n",i),exit(0);
system("cls");
if(system("fc yours.txt ans.txt>nul"))
{
system("cls");
system("color c");
printf("Wrong answer on test %llu",i);
break;
}
else
system("color a"),printf("%llu Accepted\n",i);
}
return 0;
}Randomdata.cpp:
//数据生成器ans.cpp:
//This is for std.yours.cpp:
//This is for your file.