QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#568325 | #9320. Find the Easiest Problem | lanhuo | WA | 2ms | 3636kb | C++17 | 842b | 2024-09-16 16:04:44 | 2024-09-16 16:04:49 |
Judging History
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,s3,s;
string s1;
set<string>se[26];
void solve(){
cin>>n;ma=0;
for(int i=1;i<=n;++i){
cin>>s1>>s2>>s3;
for(int j=1;j<=7;++j)cin>>s;
if(s3=='a'){
ll cnt=s2-'A';
se[cnt].insert(s1);
if(se[cnt].size()>ma){
ma=se[cnt].size();
ans=s2;
}
else if(se[cnt].size()==ma){
ans=min(ans,s2);
}
}
}
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: 100
Accepted
time: 0ms
memory: 3636kb
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: 2ms
memory: 3600kb
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:
Z P P H K H Z H H H H H H J H Y J F I D D D D D A A A I A A A A B B B G B A A A D D A O 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 2nd lines differ - expected: 'E', found: 'P'