QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#568365#9320. Find the Easiest ProblemlanhuoRE 0ms0kbC++17744b2024-09-16 16:13:032024-09-16 16:13:05

Judging History

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

  • [2024-09-16 16:13:05]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-09-16 16:13:03]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
//#pragma GCC optimize(2)
//#pragma GCC optimize(3,"Ofast","inline")
typedef long long ll;
#define pll pair<ll,ll>
const int inf=0x3f3f3f3f;
const int N=1e5+5;
const int mod=99844854;
#define PI 3.1415926
#define fi first
#define se second
ll n,ma;
char ans,s2,s;
string s1,s3;
set<string>se[26];
void solve(){
	cin>>n;ma=0;
	for(int i=1;i<=n;++i){
		cin>>s1>>s2>>s3;
		if(s3[0]=='a'){
			se[s2-'a'].insert(s1);
		}
	}
	for(int i=0;i<26;++i){
		if(se[i].size()>ma)ans='A'+i,ma=se[i].size();
	}
	cout<<ans<<endl;
}
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int __;cin>>__;
    while(__--){
    	solve();
	}
    return 0;
}

詳細信息

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: