結果

問題 No.1722 [Cherry 3rd Tune C] In my way
ユーザー 河野竜也
提出日時 2022-06-22 17:23:34
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-11-06 03:04:57
合計ジャッジ時間 2,219 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_right
n,m=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
y.sort()
for i in range(n):
  if x[i]>y[-1]:
    print("Infinity")
  else:
    cnt=bisect_right(y,x[i])
    print(y[cnt]-x[i])
0