結果
問題 |
No.206 数の積集合を求めるクエリ
|
ユーザー |
![]() |
提出日時 | 2025-06-12 14:46:44 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 537 bytes |
コンパイル時間 | 305 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 128,172 KB |
最終ジャッジ日時 | 2025-06-12 14:48:20 |
合計ジャッジ時間 | 11,046 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 TLE * 1 -- * 6 |
ソースコード
def main(): import sys input = sys.stdin.read().split() ptr = 0 L = int(input[ptr]); ptr +=1 M = int(input[ptr]); ptr +=1 N = int(input[ptr]); ptr +=1 A = list(map(int, input[ptr:ptr+L])) ptr += L B = list(map(int, input[ptr:ptr+M])) ptr += M Q = int(input[ptr]); ptr +=1 set_A = set(A) for v in range(Q): count = 0 for b in B: if (b + v) in set_A: count +=1 print(count) if __name__ == "__main__": main()