結果
| 問題 | No.2777 Wild Flush |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-07 22:15:58 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 66 ms / 2,000 ms |
| コード長 | 649 bytes |
| 記録 | |
| コンパイル時間 | 6,836 ms |
| コンパイル使用メモリ | 336,244 KB |
| 実行使用メモリ | 8,320 KB |
| 最終ジャッジ日時 | 2024-12-26 08:24:02 |
| 合計ジャッジ時間 | 8,646 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
using mint = modint998244353;
const int dx[4]={0,1,0,-1};
const int dy[4]={1,0,-1,0};
int n,k;
int main(){
cin >> n >> k;
vector<int> a(n);
rep(i,n) cin >> a[i];
map<int,int> mp;
rep(i,n){
mp[a[i]]++;
}
int kaeru_ok=mp[0];
int dai=0;
for(auto x:mp){
if(x.first==0) continue;
dai=max(dai,x.second);
}
if(dai+kaeru_ok>=k){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
return 0;
}