結果

問題 No.206 数の積集合を求めるクエリ
ユーザー mkawa2mkawa2
提出日時 2020-01-28 09:47:50
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 323 bytes
コンパイル時間 637 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 210,024 KB
最終ジャッジ日時 2023-10-13 09:21:20
合計ジャッジ時間 18,444 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
210,024 KB
testcase_01 AC 72 ms
71,408 KB
testcase_02 AC 73 ms
71,300 KB
testcase_03 AC 71 ms
71,416 KB
testcase_04 AC 72 ms
71,396 KB
testcase_05 AC 73 ms
71,420 KB
testcase_06 AC 76 ms
76,300 KB
testcase_07 AC 77 ms
76,212 KB
testcase_08 AC 77 ms
76,092 KB
testcase_09 AC 78 ms
76,560 KB
testcase_10 AC 74 ms
71,416 KB
testcase_11 AC 73 ms
71,720 KB
testcase_12 AC 145 ms
77,812 KB
testcase_13 AC 130 ms
77,536 KB
testcase_14 AC 105 ms
77,748 KB
testcase_15 AC 116 ms
77,308 KB
testcase_16 AC 102 ms
77,480 KB
testcase_17 AC 1,311 ms
100,960 KB
testcase_18 AC 700 ms
87,936 KB
testcase_19 AC 1,200 ms
100,124 KB
testcase_20 AC 700 ms
89,816 KB
testcase_21 AC 900 ms
91,772 KB
testcase_22 AC 618 ms
91,904 KB
testcase_23 AC 1,250 ms
102,028 KB
testcase_24 TLE -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def tobit(aa):
    res = 0
    for a in aa: res |= 1 << a
    return res

def popcnt(a): return bin(a).count("1")

l, m, n = map(int, input().split())
aa = list(map(int, input().split()))
bb = list(map(int, input().split()))
a = tobit(aa)
b = tobit(bb)
q = int(input())
for _ in range(q):
    print(popcnt(a & b))
    b<<=1
0