QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#567328 | #9320. Find the Easiest Problem | cogud | WA | 1ms | 6672kb | C++14 | 954b | 2024-09-16 11:08:54 | 2024-09-16 11:08:57 |
Judging History
answer
#include<iostream>
#include<map>
#include<string.h>
#define int long long
using namespace std;
int t,n;
string s1[100005];
char s2[2][15]={"accepted"," rejected"},s3[15];
char c;
int q[28]={0};
signed main(){
cin>>t;
while(t--){
memset(q,0,sizeof(q));
cin>>n;
multimap<string, char> mymap;
for(int i=1;i<=n;i++){
cin>>s1[i]>>c>>s3;
if(strcmp(s2[0],s3)==0){
mymap.insert(pair<string, char>(s1[i],c));
}
}
map<string, char>::iterator it;
for(it=mymap.begin();it!=mymap.end();it++){
char p=it->second;
int p1=(int)(p-'A');
q[p1]++;
}
int mx=0;
char m;
for(int i='Z'-'A';i>=0;i--){
if(q[i]>=mx){
mx=q[i];
m=(char)(i+'A');
}
}
cout<<m<<endl;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 6672kb
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'