結果

問題 No.1722 [Cherry 3rd Tune C] In my way
ユーザー miya145592miya145592
提出日時 2023-05-06 04:12:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 363 ms
コンパイル使用メモリ 87,272 KB
実行使用メモリ 76,700 KB
最終ジャッジ日時 2023-08-15 09:25:16
合計ジャッジ時間 4,261 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,412 KB
testcase_01 AC 78 ms
75,292 KB
testcase_02 AC 84 ms
76,496 KB
testcase_03 AC 84 ms
76,320 KB
testcase_04 AC 84 ms
76,120 KB
testcase_05 AC 81 ms
75,540 KB
testcase_06 AC 75 ms
71,176 KB
testcase_07 AC 79 ms
75,416 KB
testcase_08 AC 86 ms
76,612 KB
testcase_09 AC 79 ms
75,276 KB
testcase_10 AC 74 ms
71,344 KB
testcase_11 AC 86 ms
76,360 KB
testcase_12 AC 89 ms
76,352 KB
testcase_13 AC 86 ms
76,628 KB
testcase_14 AC 86 ms
76,652 KB
testcase_15 AC 88 ms
76,384 KB
testcase_16 AC 85 ms
76,640 KB
testcase_17 AC 87 ms
76,560 KB
testcase_18 AC 86 ms
76,700 KB
testcase_19 AC 87 ms
76,624 KB
testcase_20 AC 86 ms
76,480 KB
testcase_21 AC 75 ms
71,376 KB
testcase_22 AC 76 ms
71,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
N, M = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
Y.sort()
ans = []
for x in X:
    pos = bisect.bisect_left(Y, x)
    if pos==M:
        ans.append("Infinity")
    else:
        ans.append(Y[pos]-x)
for a in ans:
    print(a)
0