QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#574814#9320. Find the Easiest ProblemwinterlWA 24ms3736kbC++20903b2024-09-19 00:53:202024-09-19 00:53:20

Judging History

你现在查看的是最新测评结果

  • [2024-09-19 00:53:20]
  • 评测
  • 测评结果:WA
  • 用时:24ms
  • 内存:3736kb
  • [2024-09-19 00:53:20]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
map<string,int> m;

auto solve() {
    int n;
    cin>>n;
    vector a(27, 0);
    vector vis(n + 105, vector(27, false));
    int j = 1;
    for (int i = 1; i <= n; i++) {
        string s1,s2;
        char zm;
        cin>>s1;
        cin>>zm;
        cin>>s2;
        if (m.find(s1) == m.end()) {
            m[s1] = j++;
        }
        if(!vis[m[s1]][zm - 'A'+1] and s2 == "accepted") {
            a[zm - 'A'+1]++;
            vis[m[s1]][zm - 'A'+1] = true;
        }
    }
    int ans = 0,ans_i = 0;
    for (int i = 1; i <= 26; i++) {
        if(a[i] > ans) {
            ans = a[i];
            ans_i = i;
        }
    }
    cout<<char(ans_i+64)<<endl;
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int64_t t;
    cin >> t;
    while(t--)
        solve();
    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3644kb

input:

2
5
teamA A accepted
teamB B rejected
teamC A accepted
teamB B accepted
teamD C accepted
4
teamA A rejected
teamB A accepted
teamC B accepted
teamC B accepted

output:

A
A

result:

ok 2 lines

Test #2:

score: 0
Accepted
time: 16ms
memory: 3608kb

input:

1000
44
WaiooyIXa O accepted
WaiooyIXa P accepted
ZYYsNWag P accepted
DPIawQg D rejected
IzPdjnM Z rejected
Ra D rejected
kwQyGxLo I rejected
DPIawQg L accepted
kwQyGxLo I accepted
mmWxDuADCB D rejected
PXwVAOgwiz P rejected
ZYYsNWag U accepted
IzPdjnM Z accepted
TgBNO P rejected
kwQyGxLo J accepted...

output:

Z
E
Z
I
B
I
G
H
S
K
J
I
H
R
Z
C
K
O
I
P
A
B
I
A
A
N
A
B
A
O
F
O
R
T
H
G
K
E
S
D
F
D
R
C
U
V
W
P
A
O
J
E
A
B
U
M
C
T
L
G
V
A
Z
N
E
O
Q
F
B
G
J
I
E
M
A
A
E
A
K
J
J
S
E
W
Z
K
F
I
S
P
M
H
G
G
H
W
I
P
T
D
O
A
F
N
C
S
Y
Z
S
G
J
F
Q
F
O
C
B
B
U
C
I
A
E
I
P
K
C
R
X
N
D
N
L
Q
L
I
X
I
H
U
J
Z
D
K
G
F
T
F
B
H
...

result:

ok 1000 lines

Test #3:

score: -100
Wrong Answer
time: 24ms
memory: 3736kb

input:

1000
39
OnYbTl Y accepted
m I accepted
NJN T accepted
lTGE D accepted
mi K accepted
ttcHrVD W accepted
hvGveRIr J rejected
zTwvbWhhQT S rejected
VlAcLAHas E accepted
hM H accepted
wltR G rejected
JJWtQ H accepted
zVwBtj L rejected
ZVqAWCsj I rejected
BwuM B accepted
IpUXa R rejected
OdSv D rejected
...

output:

H
R
M
I
S
J
D
D
A
E
X
S
I
D
D
A
I
N
G
O
F
G
G
B
A
J
E
H
D
I
G
M
O
N
C
G
F
L
V
D
C
S
U
U
H
W
L
J
C
O
B
D
L
N
D
V
K
M
Z
C
T
H
K
U
I
T
R
F
Q
D
B
E
F
A
Q
O
F
M
C
T
M
E
Y
L
K
Q
K
E
A
O
P
J
O
B
N
R
A
E
D
I
A
Q
W
A
M
A
Z
W
K
M
I
J
B
F
L
X
E
R
G
A
I
H
C
P
T
E
K
L
Q
U
C
A
F
C
A
S
N
G
G
U
L
J
J
A
A
J
A
B
A
E
...

result:

wrong answer 43rd lines differ - expected: 'B', found: 'U'