QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#575936 | #9320. Find the Easiest Problem | qiang9 | WA | 0ms | 3616kb | C++17 | 1.2kb | 2024-09-19 17:30:09 | 2024-09-19 17:30:09 |
Judging History
answer
#include<bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
using ari = std::array<int, 3>;
using PII = std::pair<int, int>;
const int N = 2e3 + 10;
const int mod = 1e9 + 7;
const double eps = 1e-6;
#define fir first
#define sec second
void solve() {
int n;
std::cin >> n;
getchar();
std::map<char, std::set<char> > mp;
for (int i = 1; i <= n; i++) {
std::string s;
std::getline(std::cin, s);
// std::cout<<s<<'\n';
if (s[8] != 'a') continue;
// std::cout<<s[6]<<" "<<s[4]<<'\n';
mp[s[6]].insert(s[4]);
}
ll ans = 0;
char res;
for (auto &i: mp) {
if (ans < i.second.size()) {
ans = i.sec.size();
res = i.fir;
}
}
std::cout << res << '\n';
}
signed main() {
std::ios::sync_with_stdio(0);
std::cin.tie(0);
int t = 1;
std::cin >> t;
while (t--) {
solve();
}
return 0;
}
/*
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
*/
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: 3600kb
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:
I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I ...
result:
wrong answer 1st lines differ - expected: 'Z', found: 'I'