C : Hungry Games Editorial for Codeforces Round 959

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

I solved this problem using two pointers, and dp, with time complexity of O(N).
I counted the checkpoints backwards; the right side fixed, and counting all the checkpoints on the left side.
This is a nice approach too!

파이근삿값의날
Автор

are there any simple 1d array dp problems like this in cp? can you give us some similar practise problems if you know

rahulvs
Автор

good but when you explain with markers not just using box you should also use the actual example so that it will be easy to understand more

hdcutz
Автор

i thought of Sliding Window + Prefix sum

munvut