Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. Оно применяется начиная с раунда 972. ×

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

Автор ApaarGulati, история, 2 месяца назад, По-английски

Hi. i am a beginner in CP. i know only python. is there a way of solving 1994C - Hungry Games, without using dynamic programming? i tried to make subsegments and iterating through each one but i am getting TLE at test cases 5.

my submission:271274872

please suggest if there is any alternate approach this other than using dp.

Thanks

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

»
2 месяца назад, # |
Rev. 7   Проголосовать: нравится 0 Проголосовать: не нравится

Check the following accepted Python code based on the dynamic programming algorithm described in the editorial.

Python version of the editorial solution