結果
| 問題 | 
                            No.3197 Frequency Counter
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Nauclhlt🪷
                         | 
                    
| 提出日時 | 2025-07-03 20:48:21 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 804 bytes | 
| コンパイル時間 | 1,709 ms | 
| コンパイル使用メモリ | 198,012 KB | 
| 実行使用メモリ | 7,848 KB | 
| 最終ジャッジ日時 | 2025-07-10 14:47:01 | 
| 合計ジャッジ時間 | 5,158 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 2 WA * 19 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    assert(1 <= N && N <= 200000);
    vector<ll> A(N);
    for (int i = 0; i < N; i++)
    {
        cin >> A[i];
        assert(1 <= A[i] && A[i] <= 1000000000LL);
    }
    int Q;
    cin >> Q;
    for (int i = 0; i < Q; i++)
    {
        ll x;
        int k;
        cin >> x >> k;
        
        if (N <= 1000)
        {
            int count = 0;
            for (int j = 0; j < N; j++)
            {
                if (A[j] == x) count++;
            }
            if (count >= k) cout << "Yes" << endl;
            else cout << "No" << endl;
        }
        else
        {
            cout << "No" << endl;
        }
    }
}
            
            
            
        
            
Nauclhlt🪷