QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#574504#9320. Find the Easiest ProblemThe_sunlightWA 17ms3804kbC++14457b2024-09-18 22:26:452024-09-18 22:26:46

Judging History

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

  • [2024-09-18 22:26:46]
  • 评测
  • 测评结果:WA
  • 用时:17ms
  • 内存:3804kb
  • [2024-09-18 22:26:45]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int main(){
	int t;
	cin>>t;
	while(t--){
		set<string> ss[30];
		int n;
		string name,result;
		char id; 
		cin>>n;
		for(int i=1;i<=n;i++){
			cin>>name>>id>>result;
			if(result=="accepted"){
				ss[id-'A'].insert(name);
			}
		}
		int index=0;
		for(int i=1;i<'Z'-'A';i++){
			if(ss[index].size()<ss[i].size()){
				index=i;
			}
		}
		cout<<(char)('A'+index)<<endl;
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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: 17ms
memory: 3604kb

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:

C
E
H
I
B
I
G
H
S
K
J
I
H
R
A
C
K
O
I
P
A
B
I
A
A
N
A
B
A
O
F
O
R
T
H
G
K
E
S
D
F
D
R
C
U
V
W
P
A
O
J
E
A
B
U
M
C
T
L
G
V
A
O
N
E
O
Q
F
B
G
J
I
E
M
A
A
E
A
K
J
J
S
E
W
A
K
F
I
S
P
M
H
G
G
H
W
I
P
T
D
O
A
F
N
C
S
Y
P
S
G
J
F
Q
F
O
C
B
B
U
C
I
A
E
I
P
K
C
R
X
N
D
N
L
Q
L
I
X
I
H
U
J
X
D
K
G
F
T
F
B
H
...

result:

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