QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#579801 | #9320. Find the Easiest Problem | autu_rain# | WA | 8ms | 3604kb | C++14 | 742b | 2024-09-21 18:01:50 | 2024-09-21 18:01:51 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef long long i64;
typedef __int128 i128;
typedef pair<int, int> pII;
#define x first
#define y second
const int N = 2e5 + 10, M = 1e6 + 10, mod = 998244353;
int t, n, m, a[N], b[N];
pII c[N];
void solve() {
cin >> n;
unordered_map<string, int> p;
for (int i = 0; i < n; i ++ ) {
string a, b, c;
cin >> a >> b >> c;
p[b] ++;
}
string ans = "Z";
int mx = 0;
for (auto e : p)
if (e.second >= mx) {
mx = e.second;
ans = min(e.first, ans);
}
cout << ans << endl;
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr); cout.tie(nullptr);
cin >> t;
//t = 1;
while (t -- ) solve();
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3592kb
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 A
result:
ok 2 lines
Test #2:
score: -100
Wrong Answer
time: 8ms
memory: 3604kb
input:
1000 44 WaiooyIXa O accepted WaiooyIXa P accepted ZYYsNWag P accepted DPIawQg D rejected IzPdjnM Z rejected Ra D rejected kwQyGxLo I rejected DPIawQg L accepted kwQyGxLo I accepted mmWxDuADCB D rejected PXwVAOgwiz P rejected ZYYsNWag U accepted IzPdjnM Z accepted TgBNO P rejected kwQyGxLo J accepted...
output:
A C A F A I A F B B C D A B B L B A Q A A A A B A A A B F A A A B B B A H B C A C D A A F C H A C O J A B A H E B H C A B A C A B B A A H G A B B A A A J A C B A A B D B A F A G B D F A C C I E B C G H C E B A A C A A B H H A F A A B A B B H B E F B D C B A B H A A B A C A C E B G C B E F F B C A G ...
result:
wrong answer 1st lines differ - expected: 'Z', found: 'A'