結果
| 問題 |
No.2777 Wild Flush
|
| コンテスト | |
| ユーザー |
Ponzu
|
| 提出日時 | 2024-06-07 23:08:31 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 2,000 ms |
| コード長 | 519 bytes |
| コンパイル時間 | 3,708 ms |
| コンパイル使用メモリ | 242,820 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 10:02:18 |
| 合計ジャッジ時間 | 4,289 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 24 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
//#include<atcoder/all>
//using namespace atcoder;
using ll = long long;
using ull = unsigned long long;
#define rep(i,n) for(int i=0;i<(n);++i)
const int m = 100010;
int a[3<<17];
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n,k;
cin>>n>>k;
for(int i=0;i<n;++i){
int mark;cin>>mark;
a[mark]++;
}
int z = a[0];
int cnt = 0;
for(int i=1;i<m;++i){
if(a[i]+z>cnt)cnt = a[i]+z;
}
if(cnt>=k)cout << "Yes" << endl;
else cout << "No" << endl;
}
Ponzu