QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#590943 | #9320. Find the Easiest Problem | C0pyCat | RE | 0ms | 0kb | Python3 | 703b | 2024-09-26 13:12:21 | 2024-09-26 13:12:23 |
answer
# 在这里写上你的代码 :-)
T = int(input())
for t in range(T):
n = int(input())
problem_id = {}
ans = 'Z'
max_accepted = 0
for i in range(n):
inp = input().split()
if not inp[1] in problem_id:
problem_id[inp[1]] = {'num':0}
if not inp[0] in problem_id[inp[1]] and inp[2] == 'accepted':
problem_id[inp[1]][inp[0]] = 1
problem_id[inp[1]]['num'] += 1
if problem_id[inp[1][num]] > max_accepted:
max_accepted = problem_id[inp[1]][num]
ans = inp[1]
if inp[1] < ans and max_accepted == problem_id[inp[1]]['num']:
ans = inp[1]
print(ans)
詳細信息
Test #1:
score: 0
Dangerous Syscalls
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