結果
| 問題 |
No.2777 Wild Flush
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-07 21:36:02 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 2,000 ms |
| コード長 | 384 bytes |
| コンパイル時間 | 2,282 ms |
| コンパイル使用メモリ | 198,308 KB |
| 最終ジャッジ日時 | 2025-02-21 19:56:45 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int N,K; cin >> N >> K;
vector<int> ap(N+1);
while(N--){
int a; cin >> a,ap.at(a)++;
}
sort(ap.begin()+1,ap.end());
int now = ap.at(0),now2 = ap.back();
if(now+now2 >= K) cout << "Yes" << endl;
else cout << "No" << endl;
}