結果
問題 |
No.3197 Frequency Counter
|
ユーザー |
![]() |
提出日時 | 2025-07-14 00:06:02 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 230 ms / 2,000 ms |
コード長 | 530 bytes |
コンパイル時間 | 3,139 ms |
コンパイル使用メモリ | 281,124 KB |
実行使用メモリ | 17,536 KB |
最終ジャッジ日時 | 2025-07-14 00:06:10 |
合計ジャッジ時間 | 5,277 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #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() { cin.tie(nullptr)->sync_with_stdio(false); int n; cin >> n; map<int, int> cnt; rep(i, n) { int a; cin >> a; cnt[a]++; } int q; cin >> q; while (q--) { int x, k; cin >> x >> k; cout << (cnt[x] >= k ? "Yes" : "No") << '\n'; } return 0; }