QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#578912#9320. Find the Easiest ProblemthezhyWA 20ms3720kbC++17461b2024-09-20 22:44:552024-09-20 22:44:56

Judging History

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

  • [2024-09-20 22:44:56]
  • 评测
  • 测评结果:WA
  • 用时:20ms
  • 内存:3720kb
  • [2024-09-20 22:44:55]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
int t,n,mmax=-1;
string str,ss;
char c;
set<string> s[30];
int ans;
int main(){
	cin>>t;
	while(t--){
		cin>>n;
		mmax=-1;
		while(n--){
			cin>>str>>c>>ss;
			if(ss=="accepted"){
				s[c-'A'].insert(str);
			}
		}
		mmax=s[0].size();
		ans='A';
		for(int i=1;i<=25;i++){
			if(s[i].size()>mmax){
				ans=i+'A';
				mmax=s[i].size();
			}
		}
		printf("%c\n",ans);
	}
}

详细

Test #1:

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

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: 20ms
memory: 3720kb

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'