QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#567609 | #9320. Find the Easiest Problem | rlaaa | WA | 0ms | 3812kb | C++23 | 855b | 2024-09-16 13:01:35 | 2024-09-16 13:01:37 |
Judging History
answer
#include<iostream>
#include<unordered_map>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t;
cin >> t;
while (t--) {
unordered_map <string, int[26]> mp;//队名
int co[26] = { 0 };
int k;
cin >> k;
for (int i = 0; i < k; i++) {
string team, answer;
char qus;
cin >> team >> qus >> answer;
if (answer == "accepted") {
if (mp[team][qus - 'A']) continue;
co[qus - 'A']++;
}
}
int maxx = -1; char maxname;
for (int i = 0; i < 26; i++)
if (maxx < co[i]) {
maxx = co[i];
maxname = i + 'A';
}
cout << maxname << '\n';
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3812kb
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'