QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#575936#9320. Find the Easiest Problemqiang9WA 0ms3616kbC++171.2kb2024-09-19 17:30:092024-09-19 17:30:09

Judging History

你现在查看的是最新测评结果

  • [2024-09-19 17:30:09]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3616kb
  • [2024-09-19 17:30:09]
  • 提交

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'