結果
問題 | No.1077 Noelちゃんと星々4 |
ユーザー |
![]() |
提出日時 | 2020-06-14 10:35:56 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 229 bytes |
コンパイル時間 | 223 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 18,076 KB |
最終ジャッジ日時 | 2024-06-27 02:01:44 |
合計ジャッジ時間 | 4,022 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | TLE * 1 -- * 19 |
ソースコード
N = int(input()) Y = list(map(int, input().split())) dp = [0] * (10 ** 4 + 1) for i in range(N): t = float('inf') for j in range(10 ** 4 + 1): t = min(t, dp[j]) dp[j] = t + abs(Y[i] - j) print(min(dp))