-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
43 lines (41 loc) · 1.3 KB
/
Copy pathmain.cpp
File metadata and controls
43 lines (41 loc) · 1.3 KB
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
42
43
//
// (`-') (`-') _ (`-') _<-. (`-')_
// _(OO ) .-> ( OO).-> (_) ( OO).-/ \( OO) )
// ,--.(_/,-.\(`-')----. / '._ ,-(`-')(,------.,--./ ,--/
// \ \ / (_/( OO).-. ' |'--...__)| ( OO) | .---'| \ | |
// \ / / ( _) | | | `--. .--'| | )(| '--. | . '| |)
// _ \ /_) \| |)| | | | (| |_/ | .--' | |\ |
// \-'\ / ' '-' ' | | | |'-> | `---.| | \ |
// `-' `-----' `--' `--' `------'`--' `--'
//
// Lệnh chạy:
// g++ -o main main.cpp study_in_pink2.cpp
// ./main
#include "output/tc_bkel.h"
int main() {
string testPath = "testcase/output.txt";
// string testPath = "testcase/expect.txt";
OUTPUT.open(testPath);
for (int i = 0; i < 381; i++) {
TestStudyInPink::test(i);
}
string outputFile = "testcase/output.txt";
string expectFile = "testcase/expect.txt";
ifstream read_output(outputFile);
ifstream read_expect(expectFile);
if (read_expect.fail()) {
cout << "Error reading file" << endl;
OUTPUT.close();
return 0;
}
string s1, s2;
bool success = true;
while (read_output >> s1 && read_expect >> s2) {
if (s1 != s2) {
success = false;
break;
}
}
cout << (success ? "Success" : "Fail") << endl;
OUTPUT.close();
}