-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathduipai.cpp
More file actions
28 lines (25 loc) · 798 Bytes
/
Copy pathduipai.cpp
File metadata and controls
28 lines (25 loc) · 798 Bytes
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
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
system("/opt/homebrew/bin/g++-16 a.cpp -o a");
system("/opt/homebrew/bin/g++-16 date.cpp -o date1");
system("/opt/homebrew/bin/g++-16 baoli.cpp -o baoli");
while (1) {
system("./date1 > date.txt");
system("./baoli < date.txt > baoliDate.txt");
system("./a < date.txt > aDate.txt");
if (system("diff -q -w baoliDate.txt aDate.txt")) {
cout<<"WA"<<endl;
system("cat date.txt ");
cout<<"暴力答案"<<endl;
system("cat baoliDate.txt ");
cout<<"正解"<<endl;
system("cat aDate.txt");
break;
}else {
cout<<"AC"<<endl;
cout<<"##########"<<endl;
}
}
}