QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#585384#9320. Find the Easiest ProblemlqxWA 6ms3756kbC++17580b2024-09-23 20:35:132024-09-23 20:35:13

Judging History

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

  • [2024-09-23 20:35:13]
  • 评测
  • 测评结果:WA
  • 用时:6ms
  • 内存:3756kb
  • [2024-09-23 20:35:13]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N=1e5+9;
signed main(){
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	int t;cin>>t;
	while(t--){
		int cnt[30];
		int n,mx=0;
		string team,st;
		char c;
		map<string,bool> vis[30];
		cin>>n;
		for(int i=1;i<=n;i++){
			cin>>team>>c>>st;
			if(st[0]=='a'&&!vis[c-'A'][team]){
				mx=max(mx,++cnt[c-'A']);
				vis[c-'A'][team]=1;
			}
		}
		int id=0;
		for(int i=0;i<26;i++){
			if(cnt[i]==mx){
				id=i;
				break;
			}
		}
		cout<<char('A'+id)<<'\n';
	}
	return 0;
}

詳細信息

Test #1:

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

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: 3756kb

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:

K
I
K
K
K
I
K
K
I
K
K
I
K
M
K
M
K
K
K
K
I
I
K
K
I
I
K
K
G
N
K
I
N
K
H
K
K
K
K
K
H
I
K
Y
K
K
I
K
K
K
K
E
K
K
K
I
I
K
K
K
K
K
I
K
N
I
K
I
K
I
K
I
E
I
A
K
N
K
K
P
M
I
E
K
K
K
K
I
I
K
E
K
I
I
K
I
K
K
K
K
K
K
K
K
K
K
I
I
K
K
K
K
K
K
K
K
N
K
K
K
I
N
K
K
K
K
K
K
K
N
K
K
K
N
K
K
K
K
K
N
J
K
K
K
M
N
K
N
K
K
...

result:

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