結果
問題 |
No.3197 Frequency Counter
|
ユーザー |
|
提出日時 | 2025-07-14 18:14:27 |
言語 | C++17(gnu拡張) (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 896 ms / 2,000 ms |
コード長 | 934 bytes |
コンパイル時間 | 4,212 ms |
コンパイル使用メモリ | 257,556 KB |
実行使用メモリ | 22,272 KB |
最終ジャッジ日時 | 2025-07-14 18:14:41 |
合計ジャッジ時間 | 13,370 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } ll inf_ll = 9223372036854775807; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) using mint = atcoder::modint998244353; using mint1 = atcoder::modint1000000007; using Pa = std::pair<ll, ll>; int Yes(bool x){ if(x) cout << "Yes"; else cout << "No"; cout << endl; return 0; } int main(){ ll N; cin >> N; map<ll, ll> M; rep(i, N){ ll a; cin >> a; if(M.count(a) == 0){ M[a] = 1; } else{ M[a]++; } } ll Q; cin >> Q; rep(q, Q){ ll x, k; cin >> x >> k; Yes(M[x] >= k); } }