QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#573470#9320. Find the Easiest Problemyasdf123RE 0ms0kbC++20459b2024-09-18 18:55:002024-09-18 18:55:13

Judging History

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

  • [2024-09-18 18:55:13]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-09-18 18:55:00]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int run(){
	int n;
	cin>>n;
	map<string,map<string,int>> s;
	int an=0;
	char ans='Z';
	for(int i=0;i<n;i++){
		string x[3];
		cin>>x[0]>>x[1]>>x[2];
		if(x[2]=="accepted"){
			s[x[1]][x[0]]=1;
			if((s[x[1]].size()>an)||((s[x[1]].size()==an)&&(x[1][0]<ans))){
				an=s[x[1]].size();
				ans=x[1][0];
			}
		}
	}
	cout<<ans<<"\n";
}
int main(){
	int t;
	cin>>t;
	while(t--){
		run();
	}
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Runtime Error

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:


result: