QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#567980 | #9320. Find the Easiest Problem | Yueen# | WA | 0ms | 3628kb | C++14 | 479b | 2024-09-16 14:52:33 | 2024-09-16 14:52:35 |
Judging History
answer
#include<iostream>
#include<string>
#include<map>
using namespace std;
map<char,int>m;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
string d,r;
char t,chmax;
for(int i=0;i<n;i++){
cin>>d>>t>>r;
if(r[0]=='a') m[t]++;
}
int max=0;
map<char,int>::iterator it=m.begin();
for(;it!=m.end();it++){
if(it->second>max){
max=it->second;
chmax=it->first;
}
}
cout<<chmax<<endl;
m.clear();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3628kb
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'