运行这个对拍程序的前提是数据生成器,暴力,正解都是用文件输入输出,且输入输出文件需要对应
windows系统下C++对拍程序
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
while(1){
system("gen");
system("bf");
system("right");
if(system("fc bf.out right.out"))break;
}
return 0;
}
linux下系统对拍程序
#include<cstdio>
#include<cstdlib>
using namespace std;
int main(){
while(1){
system("./gen");
system("./bf");
system("./right");
if(system("diff bf.out right.out")){
printf("WA\n");
break;
}
else printf("AC\n");
}
return 0;
}