QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#565063#9320. Find the Easiest ProblemxyhhhhhWA 0ms3636kbC++20578b2024-09-15 20:05:572024-09-15 20:05:58

Judging History

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

  • [2024-09-15 20:05:58]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3636kb
  • [2024-09-15 20:05:57]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
void solve()
{
	string name,sta;char c;
	int n;
	map<string,map<char,int> >mp;
	int cnt[26]={};
	while(n--)
	{
		cin>>name>>c>>sta;
		if(sta=="accept")
		{
			if(mp[name][c]==0)
			{
				cnt[c-'A']++;
				mp[name][c]=1;
			}
		}
	}
	int mx=-1,ans;
	for(int i=0;i<26;i++)
	{
		if(cnt[i]>mx)
		{
			mx=cnt[i];
			ans=i;
		}
	}
	cout<<(char)('A'+ans)<<"\n";
}
signed main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int t=1;
	cin>>t;
	while(t--)
	{
		solve();
	}
	return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3636kb

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
A

result:

ok 2 lines

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3624kb

input:

1000
44
WaiooyIXa O accepted
WaiooyIXa P accepted
ZYYsNWag P accepted
DPIawQg D rejected
IzPdjnM Z rejected
Ra D rejected
kwQyGxLo I rejected
DPIawQg L accepted
kwQyGxLo I accepted
mmWxDuADCB D rejected
PXwVAOgwiz P rejected
ZYYsNWag U accepted
IzPdjnM Z accepted
TgBNO P rejected
kwQyGxLo J accepted...

output:

A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
...

result:

wrong answer 1st lines differ - expected: 'Z', found: 'A'