Submission #3421430
Source Code Expand
N = int(input()) l = list(map(int, input().split())) unique_l = list(set(l)) l.sort() l.append(0) ans = 0 j = 0 for i in unique_l: cnt = 0 while l[j] == i and j < N: cnt += 1 j += 1 if cnt == i: pass elif cnt > i: ans += cnt - i elif cnt < i: ans += cnt print(ans)
Submission Info
Submission Time | |
---|---|
Task | C - Good Sequence |
User | satoshi_f |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 342 Byte |
Status | WA |
Exec Time | 120 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 | 18 ms | 3064 KB |
0_01.txt | AC | 17 ms | 3060 KB |
0_02.txt | AC | 17 ms | 2940 KB |
0_03.txt | AC | 17 ms | 3060 KB |
0_04.txt | WA | 17 ms | 3064 KB |
1_00.txt | AC | 17 ms | 3064 KB |
1_01.txt | AC | 17 ms | 3060 KB |
1_02.txt | AC | 58 ms | 4660 KB |
1_03.txt | AC | 70 ms | 13964 KB |
1_04.txt | AC | 72 ms | 13936 KB |
1_05.txt | AC | 72 ms | 13936 KB |
1_06.txt | AC | 73 ms | 14020 KB |
1_07.txt | WA | 54 ms | 14268 KB |
1_08.txt | WA | 78 ms | 13664 KB |
1_09.txt | WA | 101 ms | 14244 KB |
1_10.txt | WA | 108 ms | 13596 KB |
1_11.txt | WA | 114 ms | 14692 KB |
1_12.txt | WA | 120 ms | 13944 KB |