QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#570061#9320. Find the Easiest Problemcrush_jzhRE 0ms0kbC++14694b2024-09-17 13:37:462024-09-17 13:37:47

Judging History

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

  • [2024-09-17 13:37:47]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-09-17 13:37:46]
  • 提交

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
Runtime Error

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:


result: