-
Notifications
You must be signed in to change notification settings - Fork 0
/
10188.cpp
54 lines (36 loc) · 1.14 KB
/
10188.cpp
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
44
45
46
47
48
49
50
51
52
53
54
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
ll n,m; ll cs = 0;
while(cin >> n && n){
cout << "Run #" << ++cs << ": ";
string s[n], sn, tn; bool PE = false; bool WA = false;
cin.ignore(1000, '\n');
for(ll i = 0; i < n; i++){
getline(cin, s[i]);
for(auto x: s[i]){
if(isdigit(x)) sn += string(1,x);
}
}
// cin.ignore(1000, '\n');
cin >> m;
cin.ignore(1000, '\n');
for(ll i = 0; i < m; i++){
string temp; getline(cin, temp);
for(auto x: temp){
if(isdigit(x)) tn += string(1,x);
}
if(temp == s[i]) continue;
else WA = true;
}
if(!WA && n==m) cout << "Accepted\n";
else if(sn==tn) cout << "Presentation Error\n";
else cout << "Wrong Answer\n";
}
return 0;
}