結果

問題 No.3197 Frequency Counter
ユーザー Akijin_007
提出日時 2025-07-11 22:56:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 443 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 82,004 KB
実行使用メモリ 157,300 KB
最終ジャッジ日時 2025-07-11 22:56:49
合計ジャッジ時間 6,177 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
Q = int(input())
q = [0] * Q
for i in range(Q):
    q[i] = list(map(int, input().split()))

from collections import Counter

c = Counter(A)

ans = []
for i in range(Q):
    x, k = q[i]
    if x not in c:
        ans.append("No")
    elif c[x] >= k:
        ans.append("Yes")
    else:
        ans.append("No")

for x in ans:
    print(x)

0