QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#571257#9320. Find the Easiest ProblemwangwxWA 5ms3860kbC++14850b2024-09-17 21:30:102024-09-17 21:30:11

Judging History

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

  • [2024-09-17 21:30:11]
  • 评测
  • 测评结果:WA
  • 用时:5ms
  • 内存:3860kb
  • [2024-09-17 21:30:10]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
const int mxn=1e5+7;
int n,t,ans[30];
signed main(){
    ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    cin>>t;
    while(t--){
        for(int i=0;i<30;i++) ans[i]=0;
        unordered_map<string,set<int>> mp;
        cin>>n;
        for(int i=1;i<=n;i++){
            string name,pro,fg;
            int f=0,wt;
            cin>>name>>pro>>fg;
            wt=pro[0]-'A';
            if(fg=="accepted") f=0;
            if(f==0) continue;
            mp[name].insert(wt);
        }
        for(auto it : mp){
            for(auto itt : it.second){
                ans[itt]++;
            }
        }
        int mxi=0,mx=0;
        for(int i=0;i<26;i++){
            if(ans[i]>mx) mx=ans[i],mxi=i;
        }
        char out=mxi+'A';
        cout<<out<<"\n";
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3860kb

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: 5ms
memory: 3632kb

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:

A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
...

result:

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