結果

問題 No.3197 Frequency Counter
コンテスト
ユーザー ロロット
提出日時 2025-07-11 21:59:24
言語 C++23
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 397 ms / 2,000 ms
+ 992µs
コード長 743 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,097 ms
コンパイル使用メモリ 337,316 KB
実行使用メモリ 17,536 KB
最終ジャッジ日時 2026-07-13 03:37:09
合計ジャッジ時間 6,348 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#ifndef ONLINE_JUDGE
#define _GLIBCXX_DEBUG // []で配列外参照をするとエラーにしてくれる。上下のやつがないとTLEになるので注意
#endif

#include <bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;

using ll = long long;
using Graph = vector<vector<int>>;
ll INF = 2e18 + 1;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
    int n;
    cin>>n;
    map<int,int>mp;
    for(int i=0;i<n;i++) {
        int x;
        cin>>x;
        mp[x]++;}
    int q;
    cin>>q;
    for(;q--;){
        int x,y;
        cin>>x>>y;
        cout<<((mp[x]>=y)?"Yes":"No")<<endl;
    }
}
0