ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1776. Anniversary Firework

give me a hint, please...
Posted by BORODA 31 Jan 2014 23:16
I tried to solve it with (dp[i] = sum_j(max(dp[j - 1], dp[i - j])) + 10) formula, but the way of getting the math expectation as max(dp[A], dp[B]) isn't right. Ho to do it? What is the formula..?

please, help me... :(
Re: give me a hint, please...
Add one more dimension to your DP
Re: give me a hint, please...
Posted by BORODA 2 Feb 2014 00:11
oough, I still cant get it. What is the 2nd dimension? I divide the current line(C) to A and B... I really cant understand what else should I know or do to calc C.
Re: give me a hint, please...
What else? You should actually know what is max you're trying to find expectation of!