結果

問題 No.716 距離
ユーザー 826814741_6
提出日時 2019-01-18 17:02:42
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 203 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-06 06:11:19
合計ジャッジ時間 2,025 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(g):
    l, r = next(g), next(g)
    d = r - l
    for t in g:
        d, r = t-r if d>t-r else d, t
    yield d
    yield r - l

_ = int(input())
for e in f(map(int, input().split())):
    print(e)
0