QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#576491 | #9320. Find the Easiest Problem | kramQAQ | WA | 0ms | 3668kb | C++14 | 599b | 2024-09-19 20:39:06 | 2024-09-19 20:39:07 |
Judging History
answer
#include <bits/stdc++.h>
#define endl '\n'
#define int long long
using namespace std;
void solve()
{
int n;
cin >> n;
map<char,int> mp;
for (int i = 0 ; i < n ; ++i){
string s1,s2;
char x;
cin >> s1;
cin >> x;
cin >> s2;
if (s2 == "accepted") mp[x]++;
}
int max = 0;
char ans;
for (auto& i: mp){
if (i.second > max && i.first > ans){
max = i.second;
ans = i.first;
}
}
cout << ans << endl;
}
signed main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t=1;
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: 3668kb
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 B
result:
wrong answer 2nd lines differ - expected: 'A', found: 'B'