Submission #3421287
Source Code Expand
N = int(input()) l = list(map(int, input().split())) N_MAX = int(1e+5 + 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 | RE |
Exec Time | 63 ms |
Memory | 14692 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 | AC | 30 ms | 3864 KB |
0_01.txt | AC | 30 ms | 3864 KB |
0_02.txt | AC | 31 ms | 3864 KB |
0_03.txt | RE | 21 ms | 3828 KB |
0_04.txt | AC | 30 ms | 3864 KB |
1_00.txt | AC | 30 ms | 3864 KB |
1_01.txt | AC | 30 ms | 3864 KB |
1_02.txt | AC | 55 ms | 4896 KB |
1_03.txt | AC | 62 ms | 13964 KB |
1_04.txt | AC | 63 ms | 13936 KB |
1_05.txt | RE | 44 ms | 13936 KB |
1_06.txt | RE | 46 ms | 14020 KB |
1_07.txt | AC | 63 ms | 14024 KB |
1_08.txt | RE | 44 ms | 13664 KB |
1_09.txt | RE | 45 ms | 14244 KB |
1_10.txt | RE | 45 ms | 13596 KB |
1_11.txt | RE | 45 ms | 14692 KB |
1_12.txt | RE | 44 ms | 13688 KB |