1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| #include<bits/stdc++.h> using namespace std; int main() { int ok = 0; int n = 20; system("cd E:/CodeProgram/CPP/Makers/Test/&g++ std.cpp -o std.exe&g++ baoli.cpp -o baoli.exe&g++ make.cpp -o make.exe"); for(int i = 1; i <= n; i++) { system("cd E:/CodeProgram/CPP/Makers/Test/&make.exe&baoli.exe"); double begin = clock(); system("cd E:/CodeProgram/CPP/Makers/Test/&std.exe"); double end = clock(); double t = end - begin; if(system("cd E:/CodeProgram/CPP/Makers/Test/&fc a.out a.ans")) { printf("测试点 #%d Wrong Answer\n",i); fstream file; int a, b ; file.open("E:/CodeProgram/CPP/Makers/Test/a.in"); if(file.good() && file.is_open()) file >> a >> b; printf("输入:%d %d\n\n", a, b); file.close(); } else if(t > 1000) { printf("测试点 #%d Time Limited Exeeded 用时 %.1fms\n\n", i, t); } else { printf("测试点 #%d Accepted 用时 %1.lfms\n\n", i, t); ok++; } printf("-------------------------------\n\n"); } puts(""); double res = 100.0 * ok / n; printf("共 %d 组测试数据,AC 数据 %d 组,得分:%.1lf。\n", n, ok, res); return 0; }
|