Can someone clarify this description of dp approach?

"For each cookie, we are deciding whether to leave it as is, or cut it, which 
adds L to our total perimeter and gives us up to R - L units of additional 
"slack". Once we have finished deciding which cookies to cut, we can include as 
much or as little of this "slack" as we want. All other things being equal, 
having more slack is always better for us."

What is the state of dp here ? 
if it's (remaning_p, index, slack) then how to deal with fact that slack has 
double type and it seems it can have exponential number of different values?
if it's (remaning_p, index) then it seems we need to iterate in range [0; R - 
L] inside each state as we can't be greedy and use R-L value only for example. 

You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to