結果

問題 No.1722 [Cherry 3rd Tune C] In my way
ユーザー 👑 rin204rin204
提出日時 2021-12-12 23:14:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 87,264 KB
実行使用メモリ 76,772 KB
最終ジャッジ日時 2023-09-28 17:16:04
合計ジャッジ時間 4,261 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,288 KB
testcase_01 AC 79 ms
75,428 KB
testcase_02 AC 86 ms
76,040 KB
testcase_03 AC 94 ms
76,180 KB
testcase_04 AC 84 ms
76,368 KB
testcase_05 AC 84 ms
75,340 KB
testcase_06 AC 77 ms
71,316 KB
testcase_07 AC 82 ms
75,468 KB
testcase_08 AC 88 ms
76,564 KB
testcase_09 AC 79 ms
74,888 KB
testcase_10 AC 77 ms
71,308 KB
testcase_11 AC 88 ms
76,404 KB
testcase_12 AC 89 ms
76,344 KB
testcase_13 AC 89 ms
76,628 KB
testcase_14 AC 91 ms
76,564 KB
testcase_15 AC 91 ms
76,492 KB
testcase_16 AC 89 ms
76,404 KB
testcase_17 AC 89 ms
76,556 KB
testcase_18 AC 90 ms
76,680 KB
testcase_19 AC 89 ms
76,772 KB
testcase_20 AC 90 ms
76,396 KB
testcase_21 AC 77 ms
71,252 KB
testcase_22 AC 78 ms
71,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left

n, m = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
Y.sort()

for x in X:
    p = bisect_left(Y, x)
    if p == m:
        print("Infinity")
    else:
        print(Y[p] - x)
0