結果

問題 No.1478 Simple Sugoroku
ユーザー okapinokapin
提出日時 2021-04-16 22:00:43
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 69 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 19,836 KB
最終ジャッジ日時 2023-09-16 00:40:39
合計ジャッジ時間 3,326 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,804 KB
testcase_01 AC 15 ms
7,748 KB
testcase_02 AC 15 ms
7,780 KB
testcase_03 AC 15 ms
7,768 KB
testcase_04 AC 16 ms
7,864 KB
testcase_05 AC 16 ms
7,768 KB
testcase_06 AC 15 ms
7,888 KB
testcase_07 AC 14 ms
7,780 KB
testcase_08 AC 15 ms
7,820 KB
testcase_09 AC 15 ms
7,960 KB
testcase_10 AC 15 ms
7,784 KB
testcase_11 AC 14 ms
7,808 KB
testcase_12 AC 14 ms
7,784 KB
testcase_13 AC 43 ms
19,148 KB
testcase_14 AC 42 ms
19,100 KB
testcase_15 AC 43 ms
19,076 KB
testcase_16 AC 46 ms
18,904 KB
testcase_17 AC 44 ms
19,148 KB
testcase_18 AC 45 ms
18,860 KB
testcase_19 AC 44 ms
19,132 KB
testcase_20 AC 45 ms
18,980 KB
testcase_21 AC 43 ms
19,152 KB
testcase_22 AC 44 ms
18,852 KB
testcase_23 AC 43 ms
19,152 KB
testcase_24 AC 43 ms
19,108 KB
testcase_25 AC 44 ms
19,112 KB
testcase_26 AC 44 ms
19,076 KB
testcase_27 AC 43 ms
19,224 KB
testcase_28 AC 43 ms
19,632 KB
testcase_29 AC 43 ms
19,716 KB
testcase_30 AC 43 ms
19,712 KB
testcase_31 AC 43 ms
19,648 KB
testcase_32 AC 44 ms
19,780 KB
testcase_33 AC 44 ms
19,832 KB
testcase_34 AC 43 ms
19,836 KB
testcase_35 AC 43 ms
19,696 KB
testcase_36 AC 43 ms
19,760 KB
testcase_37 AC 45 ms
18,988 KB
testcase_38 AC 47 ms
18,876 KB
testcase_39 AC 45 ms
18,832 KB
testcase_40 AC 44 ms
18,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if m==1:
    ans=n-1
else:
    tmpsum=n-b[-1]
    for i in range(m-2,-1,-1):
        warp=(tmpsum+m)/(m-i-1)
        normal=n-b[i]
        if warp<normal:
            tmp=warp
            break
        else:
            tmp=normal
            tmpsum+=n-b[i]
    ans=b[0]-1+tmp
print(ans)
0