QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#576510 | #9320. Find the Easiest Problem | kramQAQ | WA | 0ms | 3628kb | C++14 | 626b | 2024-09-19 20:44:32 | 2024-09-19 20:44:32 |
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 = 'A'-1;
for (auto& i: mp){
if (i.second > max || 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;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3628kb
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'