QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#578762#9320. Find the Easiest Problemjk231528WA 6ms3772kbC++14500b2024-09-20 21:11:352024-09-20 21:11:36

Judging History

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

  • [2024-09-20 21:11:36]
  • 评测
  • 测评结果:WA
  • 用时:6ms
  • 内存:3772kb
  • [2024-09-20 21:11:35]
  • 提交

answer

#include<iostream>
#include<set>
#include<cstring>
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=0;
		for(int i=1;i<=n;i++ )
		{
			string  s;cin>>s;
			char x;cin>>x;
			string  rt;cin>>rt;
			if(rt=="accepted")	tm[x-'A'].insert(s);
		}
		for(int i=1;i<=30;i++)
		{
			if(tm[i].size()>tm[res].size())res=i;
		}
		printf("%c\n",res+'A');
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3740kb

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: 6ms
memory: 3772kb

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:

Z
P
P
H
H
H
Z
H
H
H
H
H
H
H
H
H
J
F
F
D
D
D
D
D
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 2nd lines differ - expected: 'E', found: 'P'