結果
問題 |
No.206 数の積集合を求めるクエリ
|
ユーザー |
![]() |
提出日時 | 2020-01-28 09:47:50 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 323 bytes |
コンパイル時間 | 273 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 129,468 KB |
最終ジャッジ日時 | 2024-09-15 06:28:42 |
合計ジャッジ時間 | 17,876 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 TLE * 1 -- * 6 |
ソースコード
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