結果
| 問題 |
No.2777 Wild Flush
|
| コンテスト | |
| ユーザー |
a01sa01to
|
| 提出日時 | 2024-06-12 01:04:59 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 71 ms / 2,000 ms |
| コード長 | 630 bytes |
| コンパイル時間 | 3,686 ms |
| コンパイル使用メモリ | 251,496 KB |
| 実行使用メモリ | 8,192 KB |
| 最終ジャッジ日時 | 2024-06-12 01:05:12 |
| 合計ジャッジ時間 | 5,564 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 24 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "settings/debug.cpp"
#define _GLIBCXX_DEBUG
#else
#define Debug(...) void(0)
#endif
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;
int main() {
int n, k;
cin >> n >> k;
map<int, int> cnt;
rep(i, n) {
int a;
cin >> a;
cnt[a]++;
}
for (auto [key, val] : cnt) {
if (key == 0 && val >= k) {
cout << "Yes" << endl;
return 0;
}
if (key != 0 && val + cnt[0] >= k) {
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;
return 0;
}
a01sa01to