QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#567205#9320. Find the Easiest ProblemmikrokosmosWA 13ms10608kbPython3532b2024-09-16 10:00:502024-09-16 10:00:50

Judging History

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

  • [2024-09-16 10:00:50]
  • 评测
  • 测评结果:WA
  • 用时:13ms
  • 内存:10608kb
  • [2024-09-16 10:00:50]
  • 提交

answer

for _ in range(int(input())):
    ans = {}
    for _ in range(int(input())):
        s = list(input().split())
        if s[2] == "accepted":
            if not s[1] in ans:
                ans[s[1]] = [1,{s[0]}]
            else:
                if not s[0] in ans[s[1]][1]:
                    ans[s[1]][1].add(s[0])
                    ans[s[1]][0] += 1
    k = sorted(ans.keys(),key=lambda x: ans[x][0], reverse=True)
    t = [x for x in k if ans[x][0] == ans[k[0]][0]]
    t.sort()
    print(t)
    print(t[0])

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 13ms
memory: 10608kb

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:

['A']
A
['A', 'B']
A

result:

wrong answer 1st lines differ - expected: 'A', found: '['A']'