結果

問題 No.3197 Frequency Counter
ユーザー iastm
提出日時 2025-07-12 02:19:39
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 674 ms / 2,000 ms
コード長 412 bytes
コンパイル時間 1,085 ms
コンパイル使用メモリ 92,056 KB
実行使用メモリ 15,392 KB
最終ジャッジ日時 2025-07-12 02:19:48
合計ジャッジ時間 7,985 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <unordered_map>

int main() {
    int N;
    std::cin >> N;
    std::unordered_map<int, int> map;
    while (N--) {
        int A;
        std::cin >> A;
        map[A]++;
    }
    int Q;
    std::cin >> Q;
    while (Q--) {
        int x, k;
        std::cin >> x >> k;
        if (map[x] >= k) std::cout << "Yes" << std::endl;
        else std::cout << "No" << std::endl;
    }
}
0