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