Submission #3783756
Source Code Expand
#include <bits/stdc++.h> using namespace std; int main() { int n,k; cin>>n>>k; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } map<int,int> mp; for(int i=0;i<n;i++) mp[a[i]]++; int ans=0; int b=0; for(auto p: mp){ int l=p.second; b++; if(b>k) ans+=l; } cout<<ans<<endl; }
Submission Info
Submission Time | |
---|---|
Task | C - Not so Diverse |
User | hiroa |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 368 Byte |
Status | WA |
Exec Time | 136 ms |
Memory | 10368 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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 | WA | 1 ms | 256 KB |
10.txt | WA | 65 ms | 1024 KB |
11.txt | WA | 68 ms | 1024 KB |
12.txt | AC | 136 ms | 10368 KB |
13.txt | AC | 69 ms | 1152 KB |
2.txt | WA | 1 ms | 256 KB |
3.txt | WA | 66 ms | 1024 KB |
4.txt | WA | 73 ms | 1152 KB |
5.txt | WA | 72 ms | 1152 KB |
6.txt | AC | 67 ms | 1152 KB |
7.txt | AC | 59 ms | 896 KB |
8.txt | AC | 65 ms | 1024 KB |
9.txt | WA | 86 ms | 1792 KB |
sample1.txt | AC | 1 ms | 256 KB |
sample2.txt | AC | 1 ms | 256 KB |
sample3.txt | AC | 1 ms | 256 KB |