QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#570068#9320. Find the Easiest Problemcrush_jzhRE 0ms0kbC++14692b2024-09-17 13:39:292024-09-17 13:39:33

Judging History

你现在查看的是最新测评结果

  • [2024-09-17 13:39:33]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-09-17 13:39:29]
  • 提交

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

result: