QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#574240#9320. Find the Easiest Problemamumu123WA 0ms3636kbC++17811b2024-09-18 21:11:122024-09-18 21:11:14

Judging History

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

  • [2024-09-18 21:11:14]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3636kb
  • [2024-09-18 21:11:12]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=1005;
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        set<string>mp;
        map<char,int>mmp;
        int x=0;
        char y=65;
        while(n--){
            string a,c,d;
            char b;
            cin>>a>>b>>c;
            if(c[0]=='a'){
                d=a+b+c;//就是判断是否重复
               auto it=mp.find(d);
               if(it==mp.end()){
                mmp[b]++;
               }
            }
        }
          for(auto [key,val]:mmp){
            if(val>x){
                y=key;
            }
           }
       cout<<y<<"\n";
    }
    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3636kb

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:

C
B

result:

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