結果

問題 No.1478 Simple Sugoroku
ユーザー lloyzlloyz
提出日時 2022-10-21 07:28:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 372 bytes
コンパイル時間 260 ms
コンパイル使用メモリ 87,228 KB
実行使用メモリ 93,304 KB
最終ジャッジ日時 2023-09-13 09:48:46
合計ジャッジ時間 7,327 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,408 KB
testcase_01 AC 74 ms
71,160 KB
testcase_02 AC 70 ms
71,296 KB
testcase_03 AC 70 ms
71,388 KB
testcase_04 AC 70 ms
71,440 KB
testcase_05 AC 71 ms
71,416 KB
testcase_06 AC 71 ms
71,212 KB
testcase_07 AC 71 ms
71,264 KB
testcase_08 AC 70 ms
71,452 KB
testcase_09 AC 70 ms
71,356 KB
testcase_10 AC 69 ms
71,336 KB
testcase_11 AC 69 ms
71,236 KB
testcase_12 AC 70 ms
71,376 KB
testcase_13 AC 118 ms
93,304 KB
testcase_14 AC 97 ms
93,108 KB
testcase_15 AC 95 ms
92,980 KB
testcase_16 AC 96 ms
92,964 KB
testcase_17 AC 97 ms
92,932 KB
testcase_18 AC 97 ms
92,836 KB
testcase_19 AC 98 ms
93,100 KB
testcase_20 AC 97 ms
92,956 KB
testcase_21 AC 96 ms
93,048 KB
testcase_22 AC 98 ms
93,100 KB
testcase_23 AC 98 ms
93,252 KB
testcase_24 AC 98 ms
92,932 KB
testcase_25 AC 101 ms
93,128 KB
testcase_26 AC 96 ms
93,136 KB
testcase_27 AC 97 ms
93,000 KB
testcase_28 AC 93 ms
91,932 KB
testcase_29 AC 98 ms
92,452 KB
testcase_30 AC 95 ms
92,200 KB
testcase_31 AC 98 ms
92,476 KB
testcase_32 AC 95 ms
92,412 KB
testcase_33 AC 96 ms
92,728 KB
testcase_34 AC 102 ms
92,720 KB
testcase_35 AC 98 ms
92,472 KB
testcase_36 AC 95 ms
92,704 KB
testcase_37 AC 99 ms
92,780 KB
testcase_38 AC 98 ms
92,984 KB
testcase_39 AC 97 ms
92,884 KB
testcase_40 AC 100 ms
93,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
B = list(map(int, input().split()))

ans = n - 1
sumB = 0
for i in range(1, m):
    # (ワープから最後のワープまで移動する操作回数+ワープの操作回数の期待値)の平均と考える
    e = (m + sumB) / i
    e += (n - B[m - 1]) + (B[0] - 1)
    ans = min(ans, e)
    sumB += B[m - 1] - B[m - i - 1]
print(ans)
0