QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#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;
}
详细
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'