QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#588664#9320. Find the Easiest ProblemC0pyCatCompile Error//Python3685b2024-09-25 13:54:512024-09-25 13:54:52

Judging History

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

  • [2024-09-25 13:54:52]
  • 评测
  • [2024-09-25 13:54:51]
  • 提交

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

詳細信息

  File "answer.code", line 19
    if inp[1] < ans and max_accepted == problem_id[inp[1]] or ans = '':
                                                                  ^
SyntaxError: invalid syntax