結果
問題 | No.472 平均順位 |
ユーザー |
![]() |
提出日時 | 2020-05-06 07:49:40 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 457 bytes |
コンパイル時間 | 186 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 82,176 KB |
最終ジャッジ日時 | 2024-06-28 01:31:41 |
合計ジャッジ時間 | 7,701 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 9 TLE * 1 -- * 6 |
ソースコード
import sysdef MI(): return map(int, sys.stdin.readline().split())def LI(): return list(map(int, sys.stdin.readline().split()))def LLI(rows_number): return [LI() for _ in range(rows_number)]def main():inf=10**16n,p=MI()abc=LLI(n)dp=[inf]*(p+1)dp[0]=0for rank in abc:rank.append(1)for i in range(p,-1,-1):dp[i]=min(dp[i-di]+rank[di] for di in range(4) if i-di>=0)print(dp[p]/n)main()