結果

問題 No.1722 [Cherry 3rd Tune C] In my way
ユーザー k_o_pasturek_o_pasture
提出日時 2022-02-12 22:18:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 488 ms
コンパイル使用メモリ 87,300 KB
実行使用メモリ 76,536 KB
最終ジャッジ日時 2023-09-11 10:50:05
合計ジャッジ時間 4,326 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,120 KB
testcase_01 AC 79 ms
75,100 KB
testcase_02 AC 90 ms
75,884 KB
testcase_03 AC 84 ms
76,176 KB
testcase_04 AC 83 ms
76,096 KB
testcase_05 AC 79 ms
75,088 KB
testcase_06 AC 73 ms
71,148 KB
testcase_07 AC 80 ms
75,204 KB
testcase_08 AC 87 ms
76,016 KB
testcase_09 AC 75 ms
74,928 KB
testcase_10 AC 75 ms
71,256 KB
testcase_11 AC 86 ms
76,224 KB
testcase_12 AC 89 ms
76,288 KB
testcase_13 AC 87 ms
76,080 KB
testcase_14 AC 86 ms
76,184 KB
testcase_15 AC 86 ms
76,204 KB
testcase_16 AC 87 ms
76,260 KB
testcase_17 AC 88 ms
76,176 KB
testcase_18 AC 87 ms
76,284 KB
testcase_19 AC 88 ms
76,536 KB
testcase_20 AC 87 ms
76,368 KB
testcase_21 AC 74 ms
71,292 KB
testcase_22 AC 74 ms
71,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_right

N, M = map(int, input().split())
X = list(map(int, input().split()))
Y = sorted(list(map(int, input().split())))

for x in X:
	i = bisect_right(Y,x)
	# print('TEST',i,x)
	if i == M:
		print('Infinity')
	else:
		print(Y[i] - x)
0