對拍
#include <cstdlib>
#include <cstdio>
#include <ctime>
int main() {
for (int t = 1; t <= 10000; t++) {
system("資料生成.exe");
double st = clock();
system("待測試.exe");
double ed = clock();
system("暴力.exe");
if (system("fc 暴力.out 待測試.out")) {
puts("wa");
return 0;
} else {
printf("ACCEPTED, 測試點 #%d, 用時 %.0lfms\n", t, ed - st);
}
}
}