QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#590889#9320. Find the Easiest ProblemC0pyCatCompile Error//Python3673b2024-09-26 12:35:012024-09-26 12:35:01

Judging History

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

  • [2024-09-26 12:35:01]
  • 评测
  • [2024-09-26 12:35:01]
  • 提交

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 = {'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 < ans and max_accepted == problem_id:
            ans = inp[1]
    print(ans)

详细

  File "answer.code", line 13
    problem_id[inp[1]][inp[0]] = 1
                               ^
SyntaxError: invalid syntax