結果
| 問題 |
No.1478 Simple Sugoroku
|
| コンテスト | |
| ユーザー |
yuusanlondon
|
| 提出日時 | 2021-04-16 20:56:37 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 83 ms / 2,000 ms |
| コード長 | 343 bytes |
| コンパイル時間 | 174 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 90,580 KB |
| 最終ジャッジ日時 | 2024-07-02 23:39:44 |
| 合計ジャッジ時間 | 4,568 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
ソースコード
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+m)<=(m-i-1)*b[i]:
print(a[0]-1+(currsum+m)/(m-i-1))
exit()
else:
currsum+=b[i]
print(n-1)
yuusanlondon