QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#593558#9320. Find the Easiest ProblemC0pyCatRE 0ms0kbPython3652b2024-09-27 14:37:252024-09-27 14:37:26

Judging History

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

  • [2024-09-27 14:37:26]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-09-27 14:37:25]
  • 提交

answer

T = int(input())
for t in range(T):
    n = int(input())
    ans = 'Z'
    problem_id = {}
    max_accepted = 0
    for i in range(n):
        inp = input().split()
        if not inp[1] in problem_id:
            problem_id = {'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)

詳細信息

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

output:


result: