QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#568365 | #9320. Find the Easiest Problem | lanhuo | RE | 0ms | 0kb | C++17 | 744b | 2024-09-16 16:13:03 | 2024-09-16 16:13:05 |
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