QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#749171#9320. Find the Easiest ProblemklhwongWA 4ms3616kbC++14614b2024-11-14 22:54:162024-11-14 22:54:17

Judging History

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

  • [2024-11-14 22:54:17]
  • 评测
  • 测评结果:WA
  • 用时:4ms
  • 内存:3616kb
  • [2024-11-14 22:54:16]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

inline void work(){
    int n; cin >> n;
    set<string> names[26];
    for(int i = 0; i < n; i++){
        string tname, prob, res;
        cin >> tname >> prob >> res;
        if(res!="accepted") continue;
        names[prob[0]-'A'].insert(tname);
    }
    int ans = 0;
    for(int i = 0; i < n; i++){if(names[i].size() > names[ans].size()) ans = i;}
    cout << (char)('A' + ans) << endl;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int t;
    cin >> t;
    while(t--) work();
    return 0;
}

詳細信息

Test #1:

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

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: 3616kb

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:

\
E
\
\
B
I
\
\
\
\
\
\
H
B
\
C
\
\
I
\
\
\
\
\
\
\
A
\
A
\
\
O
\
\
H
G
\
\
\
\
\
\
\
C
U
\
W
\
\
C
J
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
A
\
\
E
\
A
\
E
A
\
J
\
\
\
\
\
\
F
\
A
\
\
\
\
\
\
F
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
R
X
N
\
\
\
B
\
\
\
\
\
\
J
\
\
K
G
\
\
\
\
A
...

result:

wrong answer 1st lines differ - expected: 'Z', found: '\'