QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#569493 | #9320. Find the Easiest Problem | wangf_916 | WA | 10ms | 3560kb | C++20 | 876b | 2024-09-16 23:39:49 | 2024-09-16 23:39:50 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define PII pair<int,int>
#define pb push_back
#define all(x) (x).begin(), (x).end()
using ll = long long;
using ull = unsigned long long;
void solve() {
int n;
cin >> n;
map<pair<string,char>, int> mp;
string s1, s2;
char c;
while(n--) {
cin >> s1 >> c >> s2;
if(s2 == "accepted") {
mp[{s1, c}] ++;
}
}
char ans = 0;
int mx = -1;
map<char, int> mp2;
for (auto [x,y] : mp) {
mp2[x.second] ++;
if(mp2[x.second] > mx) {
ans = x.second;
mx = mp2[x.second];
}
}
cout << ans << '\n';
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int tt;
cin >> tt;
while (tt--) {
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3492kb
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: 10ms
memory: 3560kb
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 E Z I B I G H T T J I H R Z L W O I P P Y I A A N S Z Q O S O Z T H G L E S D G Z R C U V W P Z O P E A B U N Q T L O X W Z N E V Q I B G J O E M A H L A K J J S E W Z K K I S P O M G G H W I P T D O P F N K S Y Z Z G J G Q F O C O P U C I U E I P K Q R X N D N L Q L I X I H Z J Z Y K G F V F B X ...
result:
wrong answer 9th lines differ - expected: 'S', found: 'T'