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
@cfstepunfilteredАй бұрын
Sure, here's a list ABC291D Flip Cards ABC179D Leaping Tak CF1741E Sending a Sequence Over the Network ABC271E Subsequence Path ABC335F Hop Sugoroku CF1954D Colored Balls
@munvut877Ай бұрын
i thought of Sliding Window + Prefix sum
@sdmfslkdmАй бұрын
bhai what is yor rating ?
@cfstepunfilteredАй бұрын
Newbie. But I don't participate in contests frequently.
@hdcutz2936Ай бұрын
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