QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#576764#9320. Find the Easiest ProblemHythayWA 46ms10660kbPython3619b2024-09-19 22:09:552024-09-19 22:09:55

Judging History

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

  • [2024-09-19 22:09:55]
  • 评测
  • 测评结果:WA
  • 用时:46ms
  • 内存:10660kb
  • [2024-09-19 22:09:55]
  • 提交

answer

from collections import defaultdict



def main():
    t = int(input())
    for _ in range(t):
        mp = defaultdict(int)
        st = set()
        n = int(input())
        for _ in range(n):
            s = input().strip()
            if s not in st:
                st.add(s)
                if s[8] == 'a':
                    mp[s[6]] += 1

        ans = 0
        p = ''
        for key, value in sorted(mp.items()):
            # print(key)
            if value > ans:
                p = key
                ans = value

        print(p)



if __name__ == "__main__":
    main()

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 9ms
memory: 10660kb

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

result:

ok 2 lines

Test #2:

score: -100
Wrong Answer
time: 46ms
memory: 10560kb

input:

1000
44
WaiooyIXa O accepted
WaiooyIXa P accepted
ZYYsNWag P accepted
DPIawQg D rejected
IzPdjnM Z rejected
Ra D rejected
kwQyGxLo I rejected
DPIawQg L accepted
kwQyGxLo I accepted
mmWxDuADCB D rejected
PXwVAOgwiz P rejected
ZYYsNWag U accepted
IzPdjnM Z accepted
TgBNO P rejected
kwQyGxLo J accepted...

output:

I
I
I
I
I
B
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
K
I
I
I
I
I
I
I

F
I
I
I
I
I
I
I
A
I
I
I
I
I
I
I
I
I
I
I
G
I
I
I
I
I
I
I
I
I

I
I
I
I
I
W
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
A
I
I
I
I
I
K
K
I
F
I
I

I
I
A
I
I
I
I
I
I
I

I
I
I
I
H
I
I
...

result:

wrong answer 1st lines differ - expected: 'Z', found: 'I'