QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#588590#9320. Find the Easiest ProblemC0pyCatWA 45ms10572kbPython3779b2024-09-25 13:31:102024-09-25 13:31:10

Judging History

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

  • [2024-09-25 13:31:10]
  • 评测
  • 测评结果:WA
  • 用时:45ms
  • 内存:10572kb
  • [2024-09-25 13:31:10]
  • 提交

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()
        if inp[2] == 'accepted':
            if not inp[0] in team_name:
                team_name[inp[0]] = 1
                if not inp[1] in problem_id:
                    problem_id[inp[1]] = 1
                    max_accepted = max(max_accepted,problem_id[inp[1]])
                else:
                    problem_id[inp[1]] += 1
                    max_accepted = max(max_accepted,problem_id[inp[1]])
                if ans == '' or max_accepted == problem_id[inp[1]] and inp[1] < ans:
                    ans = inp[1]
    print(ans)

详细

Test #1:

score: 100
Accepted
time: 20ms
memory: 10572kb

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: 45ms
memory: 10536kb

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
N
H
C
A
I
B
F
B
E
C
E
F
I
H
A
B
S
A
A
D
A
E
F
E
F
A
H
C
D
G
G
A
B
E
F
D
H
C
D
A
A
D
A
I
J
A
B
B
G
I
C
C
B
A
F
A
A
A
E
A
H
A
B
G
J
N
F
E
D
B
E
A
B
B
F
I
L
I
B
E
F
D
A
D
D
H
F
N
J
F
G
E
D
C
B
B
B
I
C
F
E
A
A
G
B
D
B
B
F
C
A
A
C
B
A
D
A
I
D
A
B
A
G
D
A
B
G
N
K
A
B
A
B
F
D
B
B
K
A
G
C
F
B
H
...

result:

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