Problem Named speedRun
https://www.codechef.com/problems/SPR?tab=statement
can anyone please help in this question , appeared in todays contest. I have got the approach after the bombing is done which is easier as well , can anyone help me further.
Thanks
Auto comment: topic has been updated by xyzbajju (previous revision, new revision, compare).
The test cases for this question were weak, as an O(n^2) solution was able to pass. See this solution: https://www.codechef.com/viewsolution/1063437308