QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#565521 | #9320. Find the Easiest Problem | green__hand | WA | 0ms | 3584kb | C++20 | 1.1kb | 2024-09-15 21:33:57 | 2024-09-15 21:33:58 |
Judging History
answer
#include <bits/stdc++.h>
#define int long long
using namespace std;
typedef long long i64;
typedef pair<int, int> PII;
const int N = 2e5 + 10, p = 998244353;
int lowbit(int x) { return x & (-x); }
int fac26[N];
int qmi(int a, int b, int p) {
int res = 1;
while (b) {
if (b & 1) res = res * a % p;
a = a * a % p;
b >>= 1;
}
return res;
}
void solve() {
int n; cin >> n;
map<string, set<string>> mp;
map<string, int> t;
for (int i = 0; i < n; i++) {
string a, b, c; cin >> a >> b >> c;
if (c == "accepted") {
if (!mp[a].count(b)) {
mp[a].insert(b);
}
t[b]++;
}
}
int max = -1e9;
string ans;
for (auto it : t) {
if (max < it.second) {
max = it.second;
ans = it.first;
}
}
cout << ans << '\n';
}
signed main() {
ios::sync_with_stdio(false), cin.tie(nullptr);
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: 3584kb
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'