duipai.cpp
//freopen("in.txt", "r", stdin); // 读入数据生成器造出来的数据 //freopen("std.txt", "w", stdout); // 输出答案 #include <bits/stdc++.h> using namespace std; int main() { while (1) // 一直循环,直到找到不一样的数据 { system("gen.exe"); system("tle.exe"); system("std.exe"); if (system("fc std.txt tle.txt")) // 当 fc 返回 1 时,说明这时数据不一样 break; // 不一样就跳出循环 } return 0; }
对拍脚本
g++ -o tle tle.cpp g++ -o std std.cpp g++ -o gen gen.cpp g++ -o duipai duipai.cpp duipai