快速测试大样例:
#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
string s;
int n;
int main() {
cin >> s >> n;
cout << "Checker : " << s << '\n';
for (int i = 1; i <= n; i++) {
string cnt = s;
cnt += ".exe < ", cnt += s, cnt += to_string(i), cnt += ".in > ", cnt += s, cnt += to_string(i), cnt += ".out";
system(cnt.c_str());
cout << "Juding in:#" << to_string(i) << '\n';
cnt = "fc ";
cnt += s, cnt += to_string(i), cnt += ".ans ";
cnt += s, cnt += to_string(i), cnt += ".out";
if (system(cnt.c_str()))
cout << "WA on test#" << to_string(i) << '\n';
else
cout << "Ac on test#" << to_string(i) << '\n';
}
string flag;
int x = 0;
while (1) {
if (x % 100 == 0) {
cout << "Check : Whether to proceed with the shoot?\n";
cin >> flag;
if (flag == "No") return 0;
}
system("data.exe > in.txt");
system("baoli.exe < in.txt > baoli.txt");
string cnt = s;
cnt += ".exe < in.txt > std.txt";
system(cnt.c_str());
x++;
cout << "Checking in : #" << to_string(x) << '\n';
if (system("fc baoli.txt std.txt")) {
cout << "WA on test# " << x << '\n';
return 0;
} else {
cout << "AC on test# " << x << '\n';
}
}
return 0;
}