Submission #2225407
Source Code Expand
import collections n,k = (int(i) for i in input().split()) x = [int(i) for i in input().split()] y = set(x) if len(y)<=k: print(0) else: answer = 0 c = collections.Counter(x).most_common() for j in range(-1,-(len(y)-k+1),-1): answer += c[j][1] print(answer)
Submission Info
Submission Time | |
---|---|
Task | C - Not so Diverse |
User | Clamperl |
Language | Python (3.4.3) |
Score | 300 |
Code Size | 275 Byte |
Status | AC |
Exec Time | 224 ms |
Memory | 50556 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt |
All | sample1.txt, sample2.txt, sample3.txt, 1.txt, 10.txt, 11.txt, 12.txt, 13.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, sample1.txt, sample2.txt, sample3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
1.txt | AC | 20 ms | 3316 KB |
10.txt | AC | 96 ms | 25992 KB |
11.txt | AC | 96 ms | 25988 KB |
12.txt | AC | 224 ms | 50556 KB |
13.txt | AC | 79 ms | 22256 KB |
2.txt | AC | 20 ms | 3316 KB |
3.txt | AC | 95 ms | 24996 KB |
4.txt | AC | 98 ms | 26500 KB |
5.txt | AC | 97 ms | 24452 KB |
6.txt | AC | 78 ms | 22988 KB |
7.txt | AC | 74 ms | 23076 KB |
8.txt | AC | 79 ms | 26024 KB |
9.txt | AC | 113 ms | 24980 KB |
sample1.txt | AC | 20 ms | 3316 KB |
sample2.txt | AC | 20 ms | 3316 KB |
sample3.txt | AC | 20 ms | 3316 KB |