QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#571762 | #9320. Find the Easiest Problem | luoZH111 | WA | 0ms | 3616kb | C++14 | 822b | 2024-09-18 08:17:22 | 2024-09-18 08:17:22 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define debugging 1
const int maxn = 200010;
#define pii pair<int, int>
#define f first
#define s second
int n;
int a[maxn];
int l[maxn], r[maxn];
int mp[30];
void solve() {
string team, status;
char c;
int mx = 0;
memset(mp, 0, sizeof(mp));
cin >> n;
for (int i = 1; i < n; ++i) {
cin >> team >> c >> status;
if (status[0] == 'a') {
mx = max(mx, ++mp[c-'A']);
}
}
int id = 0;
for (int i = 0; i < 26; ++i) {
if (mp[i] == mx) {
id = i;
break;
}
}
cout << char('A' + id) << '\n';
}
int main() {
int tt = 1;
cin >> tt;
// scanf("%d", &tt);
while (tt--) {
solve();
}
return 0;
}
/*
9
4
5 5 3 5
1: [1, 1]
2: [2, 2]
3: [3, 3]
4: [3, 4]
1
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3616kb
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: 0ms
memory: 3552kb
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:
Z A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A ...
result:
wrong answer 2nd lines differ - expected: 'E', found: 'A'