QOJ.ac
QOJ
The 2nd Universal Cup Finals is coming! Check out our event page, schedule, and competition rules!
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#570121 | #9320. Find the Easiest Problem | AceTaffy258 | WA | 0ms | 3616kb | C++20 | 723b | 2024-09-17 13:59:34 | 2024-09-17 13:59:39 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int n,m;
int ac[100005][30];
char ques_id;
string team_name,isac;
int main(){
std::ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
int T;cin>>T;
while(T--){
cin>>n;
map<string,int> idx;
int cnt=0;
for(int i=1;i<=n;i++){
for(int j=0;j<26;j++){
ac[i][j]=0;
}
}
int ans=0;char ANS;
for(int i=1;i<=n;i++){
cin>>team_name>>ques_id>>isac;
if(!idx[team_name]){
idx[team_name]=(++cnt);
}
if(isac=="accepted"){
ac[idx[team_name]][ques_id-'A']++;
if(ac[idx[team_name]][ques_id-'A']>ans){
ans=ac[idx[team_name]][ques_id-'A'];
ANS=ques_id;
}
}
}
cout<<ANS<<endl;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3616kb
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 B
result:
wrong answer 2nd lines differ - expected: 'A', found: 'B'