QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#566808#9320. Find the Easiest ProblemrlaaaTL 0ms0kbC++23915b2024-09-16 01:55:422024-09-16 01:55:42

Judging History

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

  • [2024-09-16 01:55:42]
  • 评测
  • 测评结果:TL
  • 用时:0ms
  • 内存:0kb
  • [2024-09-16 01:55:42]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while (t--) {
        unordered_set <string> se[26];
        unordered_map <char, int> mp;
        int k;
        cin >> k;
        int maxx = -1;
        for (int i = 0; i < k; k++) {
            string team, answer;
            char qus;
            cin >> team >> qus >> answer;
            if (answer == "accepted") {
                if (se[qus - 'A'].count(team) == 0) {
                    se[qus - 'A'].insert(team);
                    mp[qus]++;
                    maxx = max(maxx, mp[qus]);
                }
            }

        }
        for (auto &ele : mp) {
            if (maxx == ele.second) {
                cout << ele.first << endl;
                break;
            }
        }
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Time Limit Exceeded

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:


result: