結果

問題 No.2777 Wild Flush
ユーザー 矢澤式WINTER矢澤式WINTER
提出日時 2024-06-07 21:38:15
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 54 ms / 2,000 ms
コード長 1,283 bytes
コンパイル時間 2,735 ms
コンパイル使用メモリ 253,184 KB
実行使用メモリ 8,192 KB
最終ジャッジ日時 2024-06-07 21:38:20
合計ジャッジ時間 4,263 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 1 ms
6,944 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 2 ms
6,944 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 8 ms
6,940 KB
testcase_10 AC 7 ms
6,940 KB
testcase_11 AC 33 ms
8,192 KB
testcase_12 AC 52 ms
8,064 KB
testcase_13 AC 52 ms
8,064 KB
testcase_14 AC 54 ms
8,064 KB
testcase_15 AC 54 ms
8,192 KB
testcase_16 AC 5 ms
6,940 KB
testcase_17 AC 49 ms
7,936 KB
testcase_18 AC 33 ms
6,940 KB
testcase_19 AC 34 ms
6,944 KB
testcase_20 AC 12 ms
6,940 KB
testcase_21 AC 8 ms
6,944 KB
testcase_22 AC 30 ms
6,944 KB
testcase_23 AC 29 ms
6,944 KB
testcase_24 AC 35 ms
6,944 KB
testcase_25 AC 52 ms
8,064 KB
testcase_26 AC 48 ms
7,680 KB
testcase_27 AC 23 ms
6,944 KB
testcase_28 AC 7 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
/*/
#include <atcoder/all>
using namespace atcoder;
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#pragma GCC target("avx,avx2,fma")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
//*/
#define rep(i,n) for(ll i=0;i<n;i++)
#define Rep(i,a,b) for(int i=a;i<b;i++)
#define ALL(x) (x).begin(),(x).end()
#define dbgv(x); for(auto now : x) cout << now << " "; cout << endl;
//using P = pair<int,int>;
using ll = long long;
using ull = unsigned long long;
//*/
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<ll> vll;
typedef vector<int> vint;
random_device rnd;
mt19937 rng(rnd());

void solve(){
  int n,k; cin >> n >> k;
  map<int,int> mp;
  rep(i,n){
    int x; cin >> x;
    mp[x]++;
  }
  for(int i = 1;i <=n;i++){
    if(mp[0]+mp[i] >= k){
      cout << "Yes\n";
      return;
    }
  }
  cout << "No\n";
}
 

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1; //cin >> t;
  rep(testcase,t) solve();
}
0