QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#578733#9320. Find the Easiest Problemjk231528RE 0ms0kbC++14613b2024-09-20 21:02:402024-09-20 21:02:41

Judging History

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

  • [2024-09-20 21:02:41]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-09-20 21:02:40]
  • 提交

answer

#include<iostream>
#include<set>
#include<cstring>
#define sc scanf
using namespace std;
const int N=2e5+8;
set<string>tm[30];
int main()
{
	cin.tie(0)->sync_with_stdio(false);
	int t;cin>>t;
	while(t--)
	{
		int n;cin>>n;
		int res,maxx=0;
		for(int i=1;i<=30;i++ )	tm[i].clear();
		for(int i=1;i<=n;i++ )
		{
			string  s;cin>>s;
			char x;cin>>x;
			int num=x-'A'+1;
			string  rt;cin>>rt;
			if(rt[0]=='a')
			{
				tm[num].insert(s);
			}
		}
		for(int i=1;i<=30;i++)
		{
			if(tm[i].size()>maxx)
				maxx=tm[i].size(),res=i;
		}
		printf("%c\n",res+'A'-1);
	}
	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: