結果

問題 No.3197 Frequency Counter
ユーザー Fajar Ramadhani Putra Armadi
提出日時 2025-07-18 22:20:54
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 300 ms / 2,000 ms
コード長 499 bytes
コンパイル時間 2,144 ms
コンパイル使用メモリ 200,280 KB
実行使用メモリ 17,536 KB
最終ジャッジ日時 2025-07-18 22:21:00
合計ジャッジ時間 4,925 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define fastio                        \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL)

#define endl "\n"
#define ll long long


using namespace std;

int main()
{
    fastio;
    
    ll n; cin >> n;
    map<int, int> p;
    for (int i = 0; i < n; i++) {
        ll z; cin >> z;
        p[z]++;
    }

    ll q; cin >> q;
    while (q--) {
        ll a, b; cin >> a >> b;
        (p[a] >= b) ? cout << "Yes" << endl : cout << "No" << endl;
    }
    return 0;
}
0