QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#567601#9320. Find the Easiest ProblemrlaaaWA 2ms3844kbC++23845b2024-09-16 12:58:252024-09-16 12:58:25

Judging History

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

  • [2024-09-16 12:58:25]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3844kb
  • [2024-09-16 12:58:25]
  • 提交

answer


#include<iostream>
#include<unordered_map>
using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while (t--) {
        unordered_map <string, int> mp;//队名
        int co[26] = { 0 };
        int k;
        cin >> k;
        for (int i = 0; i < k; i++) {
            string team, answer;
            char qus;
            cin >> team >> qus >> answer;
            if (answer == "accepted") {
                if (co[qus - 'A']) continue;
                co[qus - 'A']++;
            }
        }
        int maxx = -1; char maxname;
        for (int i = 0; i < 26; i++)
            if (maxx < co[i]) {
                maxx = co[i];
                maxname = i + 'A';
            }

        cout << maxname << '\n';
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3544kb

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: 2ms
memory: 3844kb

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:

A
C
A
A
A
B
A
A
A
A
D
A
F
B
A
C
A
A
A
A
A
A
A
A
A
A
A
B
A
A
A
A
B
B
B
G
B
A
A
A
C
D
A
C
D
A
A
A
A
C
J
A
A
A
A
A
A
B
B
A
A
A
A
A
B
A
C
A
A
G
C
A
E
A
A
A
E
A
B
B
A
B
A
B
A
A
F
B
A
C
C
C
C
A
A
F
A
A
A
A
B
A
B
A
A
A
A
A
A
B
B
A
B
B
A
A
A
A
B
B
A
A
A
B
A
A
B
A
G
B
A
A
G
B
A
A
A
A
B
A
A
A
B
A
A
F
B
A
B
H
...

result:

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