結果
問題 | No.206 数の積集合を求めるクエリ |
ユーザー | tcltk |
提出日時 | 2021-01-15 02:17:48 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 916 bytes |
コンパイル時間 | 552 ms |
コンパイル使用メモリ | 87,096 KB |
実行使用メモリ | 118,740 KB |
最終ジャッジ日時 | 2023-08-16 10:27:52 |
合計ジャッジ時間 | 17,264 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 228 ms
83,360 KB |
testcase_01 | AC | 232 ms
83,376 KB |
testcase_02 | AC | 231 ms
83,532 KB |
testcase_03 | AC | 228 ms
83,372 KB |
testcase_04 | AC | 228 ms
83,400 KB |
testcase_05 | AC | 230 ms
83,312 KB |
testcase_06 | AC | 239 ms
84,112 KB |
testcase_07 | AC | 252 ms
86,904 KB |
testcase_08 | AC | 256 ms
86,836 KB |
testcase_09 | AC | 260 ms
86,752 KB |
testcase_10 | AC | 228 ms
83,536 KB |
testcase_11 | AC | 231 ms
83,644 KB |
testcase_12 | AC | 328 ms
87,420 KB |
testcase_13 | AC | 288 ms
87,136 KB |
testcase_14 | AC | 272 ms
87,048 KB |
testcase_15 | AC | 255 ms
87,536 KB |
testcase_16 | AC | 238 ms
84,852 KB |
testcase_17 | AC | 371 ms
113,652 KB |
testcase_18 | AC | 318 ms
93,528 KB |
testcase_19 | AC | 362 ms
110,240 KB |
testcase_20 | AC | 267 ms
97,780 KB |
testcase_21 | AC | 316 ms
97,680 KB |
testcase_22 | AC | 321 ms
98,752 KB |
testcase_23 | AC | 367 ms
112,284 KB |
testcase_24 | TLE | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
ソースコード
#region Header #!/usr/bin/env python3 # from typing import * import sys import io import math import collections import decimal import itertools from queue import PriorityQueue import bisect import heapq def input(): return sys.stdin.readline()[:-1] sys.setrecursionlimit(1000000) #endregion # _INPUT = """# paste here... # """ # sys.stdin = io.StringIO(_INPUT) def main(): L, M, N = map(int, input().split()) A = sorted(list(map(int, input().split()))) B = sorted(list(map(int, input().split()))) Q = int(input()) T = [0 for _ in range(Q)] for j in range(M): b = B[j] k1 = bisect.bisect_left(A, b) if k1 == L: continue k2 = bisect.bisect_right(A, b+(Q-1)) for k in range(k1, k2): a = A[k] i = a - b T[i] += 1 for i in range(Q): print(T[i]) if __name__ == '__main__': main()