Submission #2410127


Source Code Expand

def c_colorful_leaderboard(N, A):
    from collections import defaultdict
    rating_list = defaultdict(int)
    rating_color = ['gray', 'brown', 'green',
                    'skyblue', 'blue', 'yellow', 'orange', 'red']  # AtCoderのレート色
    other = 0  # レート3200以上の選手の数
    for rating in A:
        r = rating // 400  # レート色は400刻みで変わるため
        if r >= 8:  # レート3200位上
            other += 1
        else:
            rating_list[rating_color[r]] += 1
    ans = '{} {}'.format(max(1, len(rating_list)), len(rating_list) + other)
    return ans

N=int(input())
A=[int(i) for i in input().split()]
print(c_colorful_leaderboard(N, A))

Submission Info

Submission Time
Task C - Colorful Leaderboard
User kenseiQ
Language Python (3.4.3)
Score 300
Code Size 713 Byte
Status AC
Exec Time 21 ms
Memory 3316 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 8
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All in1.txt, in2.txt, in3.txt, in4.txt, in5.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
in1.txt AC 21 ms 3316 KB
in2.txt AC 21 ms 3316 KB
in3.txt AC 20 ms 3316 KB
in4.txt AC 21 ms 3316 KB
in5.txt AC 21 ms 3316 KB
s1.txt AC 21 ms 3316 KB
s2.txt AC 20 ms 3316 KB
s3.txt AC 21 ms 3316 KB