結果

問題 No.1478 Simple Sugoroku
ユーザー AEnAEn
提出日時 2023-07-25 23:36:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 62 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 82,172 KB
実行使用メモリ 88,616 KB
最終ジャッジ日時 2024-04-10 14:58:41
合計ジャッジ時間 4,327 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
52,828 KB
testcase_01 AC 33 ms
52,532 KB
testcase_02 AC 33 ms
52,312 KB
testcase_03 AC 32 ms
52,492 KB
testcase_04 AC 34 ms
52,684 KB
testcase_05 AC 33 ms
52,440 KB
testcase_06 AC 32 ms
52,824 KB
testcase_07 AC 32 ms
52,412 KB
testcase_08 AC 32 ms
53,120 KB
testcase_09 AC 34 ms
52,204 KB
testcase_10 AC 32 ms
52,000 KB
testcase_11 AC 31 ms
52,428 KB
testcase_12 AC 32 ms
52,964 KB
testcase_13 AC 60 ms
87,528 KB
testcase_14 AC 60 ms
87,900 KB
testcase_15 AC 61 ms
87,756 KB
testcase_16 AC 60 ms
86,832 KB
testcase_17 AC 60 ms
87,760 KB
testcase_18 AC 61 ms
88,000 KB
testcase_19 AC 61 ms
87,420 KB
testcase_20 AC 60 ms
86,928 KB
testcase_21 AC 62 ms
88,204 KB
testcase_22 AC 61 ms
87,824 KB
testcase_23 AC 62 ms
87,608 KB
testcase_24 AC 61 ms
87,592 KB
testcase_25 AC 60 ms
88,616 KB
testcase_26 AC 62 ms
88,092 KB
testcase_27 AC 61 ms
87,832 KB
testcase_28 AC 58 ms
84,940 KB
testcase_29 AC 55 ms
84,872 KB
testcase_30 AC 56 ms
85,108 KB
testcase_31 AC 56 ms
86,676 KB
testcase_32 AC 58 ms
86,112 KB
testcase_33 AC 58 ms
86,392 KB
testcase_34 AC 58 ms
85,916 KB
testcase_35 AC 59 ms
85,724 KB
testcase_36 AC 60 ms
86,156 KB
testcase_37 AC 57 ms
86,292 KB
testcase_38 AC 60 ms
87,244 KB
testcase_39 AC 59 ms
87,204 KB
testcase_40 AC 61 ms
87,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int, input().split())
B = list(map(int, input().split()))

dp = [float('inf')]*M
dp[-1] = N-B[-1]
sm = dp[-1]
for i in range(M-2,-1,-1):
    dp[i] = min(B[i+1]-B[i]+dp[i+1],(M+sm)/(M-i-1))
    sm += dp[i]
print(dp[0]+B[0]-1)
0