Racing Horses

//Whats wrong in this code, showing wrong answer

@jarvmac9 there is small mistake that you are taking input of the n outside the loop of test cases. you should define and take input of n inside the loop for(int i=0;i<t;i++)
For reference, see my solution

No its not working

You should post your doubt here: HORSES - Editorial
i think its a better choice

Can someone please point out the mistake I’ve made. I’m stuck on this problem.

Consider the test input:

4 9 1 32 13
4 9 1 32 13

Thanks a lot, I realized the issue about 10 minutes ago, when I tried something similar.

1 Like