結果

問題 No.1478 Simple Sugoroku
ユーザー roarisroaris
提出日時 2021-04-16 22:57:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 252 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 87,128 KB
実行使用メモリ 92,292 KB
最終ジャッジ日時 2023-09-16 02:10:59
合計ジャッジ時間 5,894 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 74 ms
71,312 KB
testcase_02 AC 70 ms
71,592 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 74 ms
71,328 KB
testcase_06 WA -
testcase_07 AC 74 ms
71,096 KB
testcase_08 AC 73 ms
71,320 KB
testcase_09 WA -
testcase_10 AC 73 ms
71,540 KB
testcase_11 AC 71 ms
71,384 KB
testcase_12 AC 75 ms
71,384 KB
testcase_13 AC 104 ms
92,044 KB
testcase_14 AC 100 ms
91,920 KB
testcase_15 AC 100 ms
92,072 KB
testcase_16 AC 99 ms
92,064 KB
testcase_17 AC 102 ms
92,028 KB
testcase_18 AC 102 ms
92,280 KB
testcase_19 AC 104 ms
92,268 KB
testcase_20 AC 102 ms
92,136 KB
testcase_21 AC 101 ms
92,148 KB
testcase_22 AC 100 ms
92,020 KB
testcase_23 AC 100 ms
92,140 KB
testcase_24 AC 100 ms
92,160 KB
testcase_25 AC 99 ms
92,212 KB
testcase_26 AC 100 ms
92,100 KB
testcase_27 AC 98 ms
92,292 KB
testcase_28 AC 98 ms
91,316 KB
testcase_29 AC 99 ms
91,628 KB
testcase_30 AC 100 ms
91,664 KB
testcase_31 AC 101 ms
91,692 KB
testcase_32 AC 100 ms
91,680 KB
testcase_33 AC 101 ms
91,564 KB
testcase_34 AC 100 ms
91,688 KB
testcase_35 AC 99 ms
91,800 KB
testcase_36 AC 98 ms
91,828 KB
testcase_37 AC 101 ms
91,840 KB
testcase_38 AC 99 ms
91,984 KB
testcase_39 AC 99 ms
91,920 KB
testcase_40 AC 99 ms
92,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N, M = map(int, input().split())
B = list(map(int, input().split()))
ans = B[0]-1+N-B[-1]+M
acc = 0

for i in range(M-1, -1, -1):
    acc += B[M-1]-B[i]
    ans = min(ans, B[0]-1+N-B[-1]+(acc+M)/(M-i))

print(ans)
0