QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#569093#9320. Find the Easiest ProblemWoufanWA 0ms3636kbC++20951b2024-09-16 20:27:182024-09-16 20:27:18

Judging History

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

  • [2024-09-16 20:27:18]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3636kb
  • [2024-09-16 20:27:18]
  • 提交

answer

//
// Created by 2 on 2024/9/15/015.
//
#include <bits/stdc++.h>

using namespace std;

#define all(a) a.begin(), a.end()
#define pb push_back
#define eb emplace_back
#define IOS ios::sync_with_stdio(false); cin.tie(0)
#define endl '\n'

using pii = pair<int, int>;
using ll = long long;
const int N = 2e5 + 10;
const int mod = 1e9;
const ll MAX = 1e18;

void solve() {
    int n;
    cin >> n;
    string s, y;
    char x;
    set<string> st[26];
    for (int i = 0; i < n; ++i) {
        cin >> s >> x >> y;
        if (y == "accepted")
            st[x - 'A'].insert(s);
    }
    int mx = 0;
    for (const auto &item: st)
        mx = max(mx, (int)size(item));

    for (int i = 0; i < 26; ++i)
        if (st[i].size() == mx) {
            cout << i + 'A' << endl;
            return;
        }
}

int main() {
    IOS;
    int t = 1;
    cin >> t;
    while (t--)
        solve();
    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3636kb

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:

65
65

result:

wrong answer 1st lines differ - expected: 'A', found: '65'