QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#570068 | #9320. Find the Easiest Problem | crush_jzh | RE | 0ms | 0kb | C++14 | 692b | 2024-09-17 13:39:29 | 2024-09-17 13:39:33 |
answer
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
unordered_map<string,int> ump[26];
int n,ans,maxn=0;
cin>>n;
for(int i=1;i<=n;i++)
{
char c;
string name,b;
cin>>name>>c>>b;
if(b=="accepted")
{
ump[c-'A'][name]++;
}
}
for(int i=0;i<26;i++)
{
if(ump[i].size()>maxn)
{
maxn=ump[i].size();
ans=i;
}
}
cout<<(char)(ans+'A')<<"\n";
}
system("pause");
return 0 ;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Dangerous Syscalls
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