結果

問題 No.1722 [Cherry 3rd Tune C] In my way
ユーザー mrngmrng
提出日時 2021-11-21 13:17:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 338 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 76,680 KB
最終ジャッジ日時 2023-09-04 22:00:36
合計ジャッジ時間 4,316 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,400 KB
testcase_01 AC 78 ms
75,372 KB
testcase_02 AC 85 ms
76,340 KB
testcase_03 AC 87 ms
76,336 KB
testcase_04 AC 85 ms
76,432 KB
testcase_05 AC 82 ms
75,384 KB
testcase_06 AC 74 ms
71,356 KB
testcase_07 AC 83 ms
75,272 KB
testcase_08 AC 90 ms
76,412 KB
testcase_09 AC 80 ms
75,368 KB
testcase_10 AC 78 ms
71,352 KB
testcase_11 AC 89 ms
76,604 KB
testcase_12 AC 91 ms
76,640 KB
testcase_13 AC 88 ms
76,284 KB
testcase_14 AC 89 ms
76,600 KB
testcase_15 AC 88 ms
76,676 KB
testcase_16 AC 89 ms
76,640 KB
testcase_17 AC 88 ms
76,680 KB
testcase_18 AC 89 ms
76,412 KB
testcase_19 AC 89 ms
76,520 KB
testcase_20 AC 89 ms
76,392 KB
testcase_21 AC 76 ms
71,680 KB
testcase_22 AC 75 ms
71,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
y.sort()
def lower_bound(a,x):
	ng,ok = -1,len(a)
	while ok-ng>1:
		m = (ng+ok)//2
		if x<=a[m]: ok = m
		else: ng = m
	return ok
for i in range(n):
	t = lower_bound(y,x[i])
	if t==m:
		print('Infinity')
	else:
		d = y[t]-x[i]
		print(d)
0