QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#568853 | #9320. Find the Easiest Problem | zhr05 | WA | 22ms | 3768kb | C++20 | 538b | 2024-09-16 18:53:57 | 2024-09-16 18:53:57 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int T,N,mx,num[26];
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+26,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]]++;
M[prob[0]].insert(name);
if(num[prob[0]]>mx) mx=num[prob[0]],ans=prob[0];
}
cout<<ans<<'\n';
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
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 A
result:
ok 2 lines
Test #2:
score: -100
Wrong Answer
time: 22ms
memory: 3768kb
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 P Z Z K H Z H H H H J H J J Z J J K Z J J Z J J A A J A J Y A Y Y O J Z Z Y S Z Z Z Y O Z H Z Z Y Z O Z Z Z Y S Y Z Z Z I Z Z Z Z Z I I I I I O I A O S A I H J I O I O I I I I O O J I I I J I J I J I I I I Y I I I I I I I J I I O J I I I I J I I I I I K J Y O I I Y I I I I O Y J I I I Z Y I J I K ...
result:
wrong answer 2nd lines differ - expected: 'E', found: 'P'