結果

問題 No.1722 [Cherry 3rd Tune C] In my way
ユーザー kohei2019kohei2019
提出日時 2023-06-09 15:54:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 87,028 KB
実行使用メモリ 76,760 KB
最終ジャッジ日時 2023-08-30 09:26:44
合計ジャッジ時間 3,343 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,380 KB
testcase_01 AC 78 ms
75,416 KB
testcase_02 AC 84 ms
76,268 KB
testcase_03 AC 88 ms
76,196 KB
testcase_04 AC 84 ms
76,332 KB
testcase_05 AC 79 ms
75,560 KB
testcase_06 AC 72 ms
71,652 KB
testcase_07 AC 80 ms
75,516 KB
testcase_08 AC 84 ms
76,728 KB
testcase_09 AC 76 ms
74,868 KB
testcase_10 AC 74 ms
71,588 KB
testcase_11 AC 90 ms
76,440 KB
testcase_12 AC 87 ms
76,612 KB
testcase_13 AC 87 ms
76,404 KB
testcase_14 AC 87 ms
76,456 KB
testcase_15 AC 87 ms
76,740 KB
testcase_16 AC 86 ms
76,760 KB
testcase_17 AC 86 ms
76,588 KB
testcase_18 AC 85 ms
76,484 KB
testcase_19 AC 86 ms
76,460 KB
testcase_20 AC 85 ms
76,448 KB
testcase_21 AC 72 ms
71,412 KB
testcase_22 AC 71 ms
71,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
N,M = map(int,input().split())
lsX = list(map(int,input().split()))
lsY = list(map(int,input().split()))
lsY.sort()
for i in range(N):
    x = lsX[i]
    ind = bisect.bisect_right(lsY, x)
    if ind >= len(lsY):
        print('Infinity')
    else:
        print(lsY[ind]-x)
0