QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#570622#9320. Find the Easiest ProblemyyfWA 0ms3476kbC++14663b2024-09-17 16:47:242024-09-17 16:47:28

Judging History

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

  • [2024-09-17 16:47:28]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3476kb
  • [2024-09-17 16:47:24]
  • 提交

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'