对拍
点击查看代码
#include<bits/stdc++.h>
using namespace std;
ifstream a,b;
int main(){
for(int i=0;;i++){
if(i%10==0)cerr<<i<<endl;
system("datamaker.exe > data.txt");
system("A.exe < data.txt > a.out");
system("B.exe < data.txt > b.out");
a.open("a.out");
b.open("b.out");
while(a.good() || b.good()){
if(a.get()!=b.get()){
system("pause");
return 0;
}
}
a.close(),b.close();
}
}