QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#570518#9320. Find the Easiest ProblemwoshidashenWA 4ms3620kbC++17697b2024-09-17 16:15:282024-09-17 16:15:29

Judging History

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

  • [2024-09-17 16:15:29]
  • 评测
  • 测评结果:WA
  • 用时:4ms
  • 内存:3620kb
  • [2024-09-17 16:15:28]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

using i64 = long long;

void solve() {
    int n;
    cin >> n;

    map<string, int> mp;
    for (int i = 0; i < n; i ++) {
        string a, b, c;
        cin >> a >> b >> c;
        if (c == "accepted" || c == "rejected") {
            mp[b] ++;
        }
    }

    int mx = 0;
    string c;
    for (auto [k, v] : mp) {
        if (v > mx) {
            mx = v;
            c = k;
        }
    }   

    cout << c << "\n";
}

int main() {
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    
    int t = 1;
    cin >> t;
    
    while (t --) {
        solve();
    }
    
    return 0;
}

詳細信息

Test #1:

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

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: -100
Wrong Answer
time: 4ms
memory: 3620kb

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
C
O
A
I
N
J
J
K
T
I
A
B
B
L
R
K
Q
H
C
F
I
H
A
A
A
Q
F
O
F
O
F
D
H
G
L
H
H
D
G
D
Q
Y
J
V
W
P
C
O
J
V
T
B
U
E
I
H
C
A
V
W
G
I
G
O
J
A
O
G
I
B
E
M
D
I
J
A
K
P
J
S
U
W
C
A
K
A
S
P
D
H
L
J
R
W
N
I
E
G
O
P
F
L
D
V
Y
S
S
O
H
K
Q
G
P
C
E
B
F
T
I
F
E
K
D
U
Q
R
O
V
K
N
L
G
L
H
M
I
E
U
J
R
Y
H
F
F
C
F
B
H
...

result:

wrong answer 3rd lines differ - expected: 'Z', found: 'C'