結果
| 問題 |
No.2777 Wild Flush
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-08 13:21:38 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 114 ms / 2,000 ms |
| コード長 | 431 bytes |
| コンパイル時間 | 5,483 ms |
| コンパイル使用メモリ | 252,200 KB |
| 実行使用メモリ | 9,728 KB |
| 最終ジャッジ日時 | 2024-12-27 21:44:55 |
| 合計ジャッジ時間 | 8,274 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 24 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
int main(){
ll n,k;
cin>>n>>k;
map<ll,ll> mp;
for(ll i=0;i<n;i++){
ll a;
cin>>a;
mp[a]++;
}
bool ok=false;
for(auto [ke,v]:mp){
if(ke==0){
continue;
}
if(mp[0]+mp[ke]>=k){
ok=true;
}
}
if(mp[0]>=k){
ok=true;
}
if(ok){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}