QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#588608#9320. Find the Easiest ProblemC0pyCatWA 56ms10636kbPython3654b2024-09-25 13:39:242024-09-25 13:39:24

Judging History

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

  • [2024-09-25 13:39:24]
  • 评测
  • 测评结果:WA
  • 用时:56ms
  • 内存:10636kb
  • [2024-09-25 13:39:24]
  • 提交

answer

# 在这里写上你的代码 :-)
T = int(input())
for t in range(T):
    n = int(input())
    team_name = {}
    problem_id = {}
    ans = ''
    max_accepted = 0
    for i in range(n):
        inp = input().split()
        problem_id[inp[1]] = 0
        if inp[2] == 'accepted' and not inp[0] in team_name:
            team_name[inp[0]] = 1
            problem_id[inp[1]] += 1
            if  max_accepted < problem_id[inp[1]]:
                max_accepted = problem_id[inp[1]]
                ans = inp[1]
            elif inp[1] < ans and max_accepted == problem_id[inp[1]] or ans == '':
                ans = inp[1]
    print(ans)

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 15ms
memory: 10636kb

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: 56ms
memory: 10608kb

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:

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

result:

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