QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#749171 | #9320. Find the Easiest Problem | klhwong | WA | 4ms | 3616kb | C++14 | 614b | 2024-11-14 22:54:16 | 2024-11-14 22:54:17 |
Judging History
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;
}
Details
Tip: Click on the bar to expand more detailed information
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: '\'