Help needed in USACO 2012 November Contest, Gold Problem 1. Balanced Cow Breeds

Revision en1, by ngk_manh, 2020-12-30 18:04:29

Hi guy, I was trying to solve a problem (link : http://www.usaco.org/index.php?page=viewproblem2&cpid=193〈=en)

It's a dynamic programming problem and the most difficult to solve is optimize the state of dp function.

Nearly, I found a cool solution (it's the second code in this solution : http://www.usaco.org/current/data/sol_bbreeds.html)

I don't understand how does it's work. Can you tell me the idea behind that?

Thanks you very much!

Tags #usaco

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ngk_manh 2020-12-30 18:04:29 534 Initial revision (published)