QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#570622 | #9320. Find the Easiest Problem | yyf | WA | 0ms | 3476kb | C++14 | 663b | 2024-09-17 16:47:24 | 2024-09-17 16:47:28 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
void solve(){
int n;
cin>>n;
int cnt[30];
set<pair<string,char>> st;
char s2;
string s1,s3;
for(int i=0;i<n;i++){
cin>>s1>>s2>>s3;
if(s3=="accepted"){
if(st.find({s1,s2})!=st.end()) continue;
st.insert({s1,s2});
cnt[s2-'A']++;
}
}
char ans;
int x;
int Max=-1;
for(int i=0;i<30;i++){
if(cnt[i]>Max){
Max=cnt[i];
x=i;
}
}
ans=x+'A';
cout<<ans<<endl;
}
int main(){
int t;
cin>>t;
while(t--) solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3476kb
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:
M M
result:
wrong answer 1st lines differ - expected: 'A', found: 'M'