Help for 1st test case of VIDEO GAME?

MY SOLUTION
give wrong answer.

Hi, @codedirector I am not able to understand your logic. You can check out my solution though if it helps https://www.codechef.com/viewsolution/32783806

1 Like

Here’s a random test input that your solution fails on:

3 54
3 0 27
4 3 4 3 4 2 2 3 1 4 2 2 1 3 0
2 Likes

https://www.codechef.com/viewsolution/33034594
new solutions with more easy to understand

thanks for your input

1 Like