QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#567876#9320. Find the Easiest ProblemsecurityWA 2ms3568kbC++14516b2024-09-16 14:26:032024-09-16 14:26:03

Judging History

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

  • [2024-09-16 14:26:03]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3568kb
  • [2024-09-16 14:26:03]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;

#define endl '\n'

map<char,int>m;

void solve(){
	int n; cin>>n;
	int maxx = -1;
	while(n--){
		string a,b; char c; cin>>a>>c>>b;
		if(b=="accepted"){
			m[c]++;
		} 
	}
	for(char i='A';i<='Z';i++){
		maxx = max(maxx,m[i]);
	}
	for(char i='A';i<='Z';i++){
		if(maxx == m[i]){
			cout<<i<<endl;
			return ;
		}
	}
}

int main(){
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int T; cin>>T;
	while(T--){
		solve();
	}
	return 0;
}

詳細信息

Test #1:

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

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: 2ms
memory: 3568kb

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
Z
Z
Z
Z
Z
H
H
H
J
J
H
J
J
J
J
J
J
J
J
J
J
J
J
J
J
J
J
J
J
J
J
Y
Y
Y
Z
Z
S
S
H
S
S
S
S
Z
H
H
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
O
H
H
O
J
O
J
O
O
O
I
H
H
H
H
H
H
H
H
H
H
H
H
O
O
O
O
O
O
O
O
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
...

result:

wrong answer 2nd lines differ - expected: 'E', found: 'P'