Codeforces Round #437 (Div. 1) C - Gotta Go Fast
5289 ワード
トランスファゲート
标题:1つのゲームには全部でnつの関門があり、i番目の関門についてはa[i]時間で通過する確率がp[i]で、b[i]で通過する時間が1-p[i]で、1つの関門を通過するたびに次の関門または時間清0を継続することができ、1番目の関門から、まずすべての関門を通過する時間とRを超えないことを要求してから徹底的に通関することができる.クリア位置までのプレイ時間の期待値を聞く
方法:
答えはきっと増加の性質を満たすので、それでは私达の2分の1の答えはきっと欠点がなくて、また、これはdpで、彼のすべての関の期待が次の関に対して影响があるため、dpで処理して欠点がなくて、また方程式を移すのは何ですか.
考えてみれば、dp[i][j]が第i関の最後の結果jの期待を表す場合.
さて、dp[i][j]=(dp[i+1][j+f[i]++f[i])*p[i]/100+(dp[i+1][i+s[i]++s[i])*(100-p[i])/100ですか、最後にdp[0][0]が答えですね.
标题:1つのゲームには全部でnつの関門があり、i番目の関門についてはa[i]時間で通過する確率がp[i]で、b[i]で通過する時間が1-p[i]で、1つの関門を通過するたびに次の関門または時間清0を継続することができ、1番目の関門から、まずすべての関門を通過する時間とRを超えないことを要求してから徹底的に通関することができる.クリア位置までのプレイ時間の期待値を聞く
方法:
答えはきっと増加の性質を満たすので、それでは私达の2分の1の答えはきっと欠点がなくて、また、これはdpで、彼のすべての関の期待が次の関に対して影响があるため、dpで処理して欠点がなくて、また方程式を移すのは何ですか.
考えてみれば、dp[i][j]が第i関の最後の結果jの期待を表す場合.
さて、dp[i][j]=(dp[i+1][j+f[i]++f[i])*p[i]/100+(dp[i+1][i+s[i]++s[i])*(100-p[i])/100ですか、最後にdp[0][0]が答えですね.
/// .-~~~~~~~~~-._ _.-~~~~~~~~~-.
/// __.' ~. .~ `.__
/// .'// \./ \\`.
/// .'// | \\`.
/// .'// .-~"""""""~~~~-._ | _,-~~~~"""""""~-. \\`.
/// .'//.-" `-. | .-' "-.\\`.
/// .'//______.============-.. \ | / ..-============.______\\`.
/// .'______________________________\|/______________________________`.
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include
#include
#include
#include