USACO Gold Cow Camp

Hi, im currently working on the 2022 february gold problem cow camp with the official solution.

I am getting everything, except when they state we only need to calculate when ⌊E_x⌋ < ⌊E_(x+q)⌋.Why wouldn’t it just be E_x < E_(x+q)?
Thanks in advance

I don’t see this in the analysis. Which part are you referring to?

1 Like

This part:

It’s always true that E_x<E_{x+q} when q>0

1 Like

Also, I usually code in Java or C++. Could someone please explain this code? I’ve tried searching online.

prob = [(x+y)/2 for x, y in zip([Decimal(0)]+prob, prob+[Decimal(0)])]

Thank you

or ask ChatGPT

1 Like