QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#619895 | #9320. Find the Easiest Problem | HT_walnut | WA | 16ms | 4044kb | C++14 | 519b | 2024-10-07 15:48:30 | 2024-10-07 15:48:36 |
Judging History
answer
#include <iostream>
#include <set>
using namespace std;
int t, n, ans;
set <string> a[30];
string s1, s3;
char s2;
int main() {
scanf("%d", &t);
while (t--) {
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
cin >> s1 >> s2 >> s3;
a[s2 - 'A' + 1].insert(s1);
}
ans = 0;
for (int i = 1; i <= 26; i++) {
if (a[i].size() > a[ans].size()) ans = i;
}
printf("%c\n", ans + 'A' - 1);
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 4044kb
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: 16ms
memory: 3772kb
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:
P P P H H H H H H H H D D D D D D 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 1st lines differ - expected: 'Z', found: 'P'