对拍一共建立 4 个文件
duipai.cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
int t = 0;
while(1){
cout <<"Test: " << t++ <<endl;
system("data.exe > data.in");
system("std.exe < data.in > std.out");
system("solve.exe < data.in > solve.out");
if(system("fc std.out solve.out > diff.log")){
cout <<"WA" <<endl;
break;
}
cout <<"AC\n";
}
}
data.cpp
生成数据
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
const int inf = 0x3f3f3f3f3f3f3f3f;
const int N = 2e5 + 10;
const int mod = 1e9 + 7;
int ran(int a, int b){
return (rand() % (b - a + 1)) + a;
}
void solve(){
srand(time(0));
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(0);
int t = 1;
//cin >> t;
while(t--){
solve();
}
return 0;
}