Submission #3421296
Source Code Expand
N = int(input()) l = list(map(int, input().split())) N_MAX = int(1e+9 + 1) cnt = [0 for _ in range(N_MAX)] for i in l: cnt[i] += 1 ans = 0 for idx, val in enumerate(cnt): if val == 0 or val == idx: pass elif val < idx: ans += val elif idx < val: ans += val - idx print(ans)
Submission Info
Submission Time | |
---|---|
Task | C - Good Sequence |
User | satoshi_f |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 328 Byte |
Status | TLE |
Exec Time | 2137 ms |
Memory | 520772 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt, 0_03.txt, 0_04.txt |
All | 0_00.txt, 0_01.txt, 0_02.txt, 0_03.txt, 0_04.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt, 1_12.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | TLE | 2132 ms | 493336 KB |
0_01.txt | TLE | 2129 ms | 486168 KB |
0_02.txt | TLE | 2132 ms | 493336 KB |
0_03.txt | TLE | 2133 ms | 511896 KB |
0_04.txt | TLE | 2135 ms | 493172 KB |
1_00.txt | TLE | 2132 ms | 492184 KB |
1_01.txt | TLE | 2133 ms | 492440 KB |
1_02.txt | TLE | 2132 ms | 510500 KB |
1_03.txt | TLE | 2132 ms | 513620 KB |
1_04.txt | TLE | 2135 ms | 520372 KB |
1_05.txt | TLE | 2132 ms | 514744 KB |
1_06.txt | TLE | 2137 ms | 520772 KB |
1_07.txt | TLE | 2134 ms | 518856 KB |
1_08.txt | TLE | 2132 ms | 517216 KB |
1_09.txt | TLE | 2131 ms | 518100 KB |
1_10.txt | TLE | 2135 ms | 518168 KB |
1_11.txt | TLE | 2133 ms | 519392 KB |
1_12.txt | TLE | 2135 ms | 518648 KB |