QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#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;
}
詳細信息
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'