Блог пользователя tinymon

Автор tinymon, 5 лет назад, По-английски

Hi, I am new to codeforces :D

I was trying this problem, and I have a doubt in the editorial given here.

How do we represent the function F without the parameter H? We cannot create a DP table if H was there as it would be too large. Also, H has to be a part of the function somehow. Can anyone explain how to maintain that constraint?

Thanks for any help!

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Then the solution to our problem is just the maximum f(C) for all C where the sum of all the heights of cows in C is at least H.