QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#568861 | #9320. Find the Easiest Problem | zhr05 | WA | 0ms | 3624kb | C++20 | 553b | 2024-09-16 18:57:03 | 2024-09-16 18:57:03 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int T,N,mx,num[30];
char ans;
string name,prob,resu;
unordered_map<char, unordered_set<string> >M;
signed main(){
for(cin>>T;T;T--){
cin>>N;
ans='A',mx=0,M.clear(),fill(num,num+28,0);
for(int i=1;i<=N;i++) {
cin>>name>>prob>>resu;
if(resu=="rejected") continue;
if(M[prob[0]].find(name)==M[prob[0]].end()) num[prob[0]-'A']++;
else M[prob[0]].insert(name);
if(num[prob[0]-'A']>mx) mx=num[prob[0]-'A'],ans=prob[0];
}
cout<<ans<<'\n';
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3624kb
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 B
result:
wrong answer 2nd lines differ - expected: 'A', found: 'B'