結果

問題 No.1478 Simple Sugoroku
ユーザー yuusanlondonyuusanlondon
提出日時 2021-04-16 20:43:47
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 741 ms
コンパイル使用メモリ 86,804 KB
実行使用メモリ 98,776 KB
最終ジャッジ日時 2023-09-15 21:48:55
合計ジャッジ時間 6,423 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 76 ms
71,284 KB
testcase_02 AC 77 ms
71,412 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 76 ms
71,152 KB
testcase_11 WA -
testcase_12 AC 75 ms
71,216 KB
testcase_13 AC 103 ms
98,420 KB
testcase_14 AC 103 ms
98,436 KB
testcase_15 AC 101 ms
98,432 KB
testcase_16 AC 104 ms
98,480 KB
testcase_17 AC 102 ms
98,452 KB
testcase_18 AC 103 ms
98,408 KB
testcase_19 AC 102 ms
98,424 KB
testcase_20 AC 100 ms
98,532 KB
testcase_21 AC 102 ms
98,464 KB
testcase_22 AC 104 ms
98,536 KB
testcase_23 AC 103 ms
98,776 KB
testcase_24 AC 101 ms
98,488 KB
testcase_25 AC 103 ms
98,648 KB
testcase_26 AC 104 ms
98,548 KB
testcase_27 AC 102 ms
98,436 KB
testcase_28 AC 101 ms
97,020 KB
testcase_29 AC 101 ms
97,336 KB
testcase_30 AC 99 ms
97,244 KB
testcase_31 AC 100 ms
97,328 KB
testcase_32 AC 102 ms
97,264 KB
testcase_33 AC 101 ms
97,800 KB
testcase_34 AC 101 ms
97,592 KB
testcase_35 AC 102 ms
97,576 KB
testcase_36 AC 100 ms
97,624 KB
testcase_37 AC 107 ms
98,336 KB
testcase_38 AC 103 ms
98,012 KB
testcase_39 AC 101 ms
98,020 KB
testcase_40 AC 102 ms
98,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import os,io,heapq
input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=[]
for i in range(m):
  b.append(n-a[i])
currsum=0
flag=0
for i in range(m-1,-1,-1):
  if (currsum+i+1)<=(m-i-1)*b[i]:
    print(a[0]+(currsum+i+1)/(m-i-1))
    exit()
  else:
    currsum+=b[i]
print(n)
0