QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#578909 | #9320. Find the Easiest Problem | thezhy | WA | 0ms | 3752kb | C++17 | 498b | 2024-09-20 22:42:31 | 2024-09-20 22:42:32 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
int t,n,mmax=-1;
string str,ss;
char c;
map<char,int> mp;
set<string> s[15];
int ans;
int main(){
cin>>t;
while(t--){
cin>>n;
mmax=-1;
mp.clear();
while(n--){
cin>>str>>c>>ss;
if(ss=="accepted"){
s[c-'A'].insert(str);
}
}
mmax=s[0].size();
ans='A';
for(int i=1;i<=25;i++){
if(s[i].size()>mmax){
ans=i+'A';
mmax=s[i].size();
}
}
printf("%c\n",ans);
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3752kb
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:
P P
result:
wrong answer 1st lines differ - expected: 'A', found: 'P'