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 1112. Cover

I know why you got WA at #4
Posted by CmYkRgB123 31 Oct 2008 10:38
if you use dp,then check your state.
you should make the 0th segment (-1000,-1000) and the (N+1)th segment (1000,1000)
The answer is not at F[N] but F[N+1]-1.