結果
問題 | No.472 平均順位 |
ユーザー | asumo0729 |
提出日時 | 2020-12-16 13:40:25 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 512 bytes |
コンパイル時間 | 164 ms |
コンパイル使用メモリ | 81,584 KB |
実行使用メモリ | 80,200 KB |
最終ジャッジ日時 | 2023-10-20 09:28:12 |
合計ジャッジ時間 | 6,769 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 40 ms
53,340 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | TLE | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
ソースコード
import sys stdin=sys.stdin ip=lambda: int(sp()) fp=lambda: float(sp()) lp=lambda:list(map(int,stdin.readline().split())) tp=lambda:tuple(map(int,stdin.readline().split())) sp=lambda:stdin.readline().rstrip() yp=lambda:print('Yes') np=lambda:print('No') n,p=lp() inf=float('inf') dp=[inf for _ in range(p+1)] dp[0]=0 for _ in range(n): now=lp() now.append(1) for i in range(p,-1,-1): for j in range(4): if i-j>=0: dp[i]=min(dp[i-j]+now[j],dp[i]) print(dp[-1]/n)