QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#570612#9320. Find the Easiest ProblemyyfWA 0ms3560kbC++14641b2024-09-17 16:44:522024-09-17 16:44:58

Judging History

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

  • [2024-09-17 16:44:58]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3560kb
  • [2024-09-17 16:44:52]
  • 提交

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 Max=-1;
    for(int i=0;i<30;i++){
        if(cnt[i]>Max){
            Max=cnt[i];
            ans=i;
        }
    }
    cout<<ans+'A'<<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: 3560kb

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:

75
75

result:

wrong answer 1st lines differ - expected: 'A', found: '75'