QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#588675#9320. Find the Easiest ProblemC0pyCatWA 60ms10648kbPython3949b2024-09-25 13:57:252024-09-25 13:57:25

Judging History

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

  • [2024-09-25 13:57:25]
  • 评测
  • 测评结果:WA
  • 用时:60ms
  • 内存:10648kb
  • [2024-09-25 13:57:25]
  • 提交

answer

T = int(input())
for t in range(T):
    n = int(input())
    team_name = {}
    problem_id = {}
    max_accepted = 0
    ans = None

    for i in range(n):
        inp = input().split()
        team = inp[0]
        problem = inp[1]
        result = inp[2]

        if result == 'accepted':
            if team not in team_name:
                team_name[team] = True  # Mark team as having accepted a problem
                if problem not in problem_id:
                    problem_id[problem] = 0
                problem_id[problem] += 1
                
                # Update max accepted problem logic
                if problem_id[problem] > max_accepted:
                    max_accepted = problem_id[problem]
                    ans = problem
                elif problem_id[problem] == max_accepted:
                    if ans is None or problem < ans:
                        ans = problem

    print(ans)

詳細信息

Test #1:

score: 100
Accepted
time: 14ms
memory: 10648kb

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: 60ms
memory: 10584kb

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:

O
P
P
A
B
I
N
H
V
A
T
I
F
R
E
C
N
F
I
V
A
B
S
B
A
O
A
E
F
O
F
A
Y
O
H
G
K
Z
B
F
F
D
R
C
U
T
W
I
A
I
J
A
K
L
I
M
C
C
B
A
V
O
F
A
E
A
H
R
B
G
J
O
F
H
D
B
E
A
B
W
H
M
O
I
B
E
F
W
A
E
P
H
F
N
J
Y
K
P
V
X
O
B
P
I
K
X
L
Z
H
Q
B
D
B
T
F
C
B
U
F
L
A
H
T
I
G
A
C
R
G
V
A
N
O
N
K
I
M
R
H
N
J
K
F
K
A
G
N
F
B
H
...

result:

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