QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#569800#9320. Find the Easiest ProblemAntonioniWA 21ms3628kbC++17560b2024-09-17 10:58:592024-09-17 10:59:00

Judging History

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

  • [2024-09-17 10:59:00]
  • 评测
  • 测评结果:WA
  • 用时:21ms
  • 内存:3628kb
  • [2024-09-17 10:58:59]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
map<string,set<int>>mp;
map<char,int>prob;
void solve(){
	int n;cin>>n;
	int ans=0;
	for(int i=1;i<=n;i++){
		string s;cin>>s;
		string ch;cin>>ch;
		string st;
		cin>>st;
		if(st=="accepted"&&mp[s].count(ch[0])==0){
			mp[s].insert(ch[0]);
			prob[ch[0]]++;
			ans=max(ans,prob[ch[0]]);
		}
		
	}
	for(auto it: prob){
		if(ans=it.second){
			cout<<it.first<<endl;
			mp.clear();
			prob.clear();
			return ;
		}
	}
	
}
int main(){
	int t;
	cin>>t;
	while(t--){
		solve();
	}   
}

详细

Test #1:

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

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: 21ms
memory: 3628kb

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:

A
C
A
A
A
B
A
A
A
A
D
A
F
B
A
C
A
A
A
A
A
A
A
A
A
A
A
B
A
A
A
A
B
B
B
G
B
A
A
A
C
D
A
C
D
A
A
A
A
C
J
A
A
A
A
A
A
B
B
A
A
A
A
A
B
A
C
A
A
G
C
A
E
A
A
A
E
A
B
B
A
B
A
B
A
A
F
B
A
C
C
C
C
A
A
F
A
A
A
A
B
A
B
A
A
A
A
A
A
B
B
A
B
B
A
A
A
A
B
B
A
A
A
B
A
A
B
A
G
B
A
A
G
B
A
A
A
A
B
A
A
A
B
A
A
F
B
A
B
H
...

result:

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