Submission #3456124
Source Code Expand
#include<iostream> #include <string> #include<vector> #include<algorithm> typedef long long ll; using namespace std; int main() { int n,k; cin >> n>>k; vector<int> box(200001,0); for (int i = 0; i < n; i++) { int dammy; cin >> dammy; box[dammy] += 1; } sort(box.begin(), box.end(), greater<int>()); int kotae = 0; for (int i = k; i < box.size(); i++) { kotae += box[i]; } cout << kotae; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Not so Diverse |
User | subway02 |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 444 Byte |
Status | AC |
Exec Time | 68 ms |
Memory | 1024 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 | 4 ms | 1024 KB |
10.txt | AC | 62 ms | 1024 KB |
11.txt | AC | 62 ms | 1024 KB |
12.txt | AC | 62 ms | 1024 KB |
13.txt | AC | 57 ms | 1024 KB |
2.txt | AC | 4 ms | 1024 KB |
3.txt | AC | 62 ms | 1024 KB |
4.txt | AC | 62 ms | 1024 KB |
5.txt | AC | 68 ms | 1024 KB |
6.txt | AC | 56 ms | 1024 KB |
7.txt | AC | 59 ms | 1024 KB |
8.txt | AC | 59 ms | 1024 KB |
9.txt | AC | 62 ms | 1024 KB |
sample1.txt | AC | 4 ms | 1024 KB |
sample2.txt | AC | 5 ms | 1024 KB |
sample3.txt | AC | 4 ms | 1024 KB |