QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#566664 | #9320. Find the Easiest Problem | KobicGend | WA | 0ms | 3776kb | C++20 | 829b | 2024-09-16 01:05:14 | 2024-09-16 01:05:14 |
Judging History
answer
#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <array>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <bitset>
using namespace std;
using ll = long long;
void eachT() {
int n;
cin >> n;
map<string, vector<string>> a;
while (n--) {
string name, id, op;
cin >> name >> id >> op;
if (op[0] == 'a') {
a[id].push_back(name);
}
}
string mx = "";
for (auto& [k, vec] : a) {
if (a[mx].size() < a[k].size()) {
mx = k;
}
}
cout << mx << '\n';
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int T = 1;
cin >> T;
while (T--) {
eachT();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3776kb
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'