QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#593620#9320. Find the Easiest ProblemC0pyCatCompile Error//Python3658b2024-09-27 15:05:062024-09-27 15:05:07

Judging History

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

  • [2024-09-27 15:05:07]
  • 评测
  • [2024-09-27 15:05:06]
  • 提交

answer

T = int(input())
for t in range(T):
    n = int(input())
    ans = 'Z'
    problem_id = {}
    max_accepted = 0
    for i range(n):
        inp = input().split()
        if not inp[1] in problem_id:
            problem_id[inp[1]] = {'num':0, 'team':{}}
        if inp[2] == 'accepted' and not inp[0] in problem_id[inp[1]]['team']:
            problem_id[inp[1]]['team'][inp[0]] = 1
            problem_id[inp[1]]['num'] += 1
            if problem_id[inp[1]]['num'] > max_accepted or problem_id[inp[1]]['num'] == max_accepted and inp[1]<ans:
                max_accepted = problem_id[inp[1]]['num']
                ans = inp[1]
    print(ans)

Details

  File "answer.code", line 7
    for i range(n):
          ^^^^^
SyntaxError: invalid syntax