Not getting AC in Warmhole problem.

I have been trying to solve Warmhole problem but I am getting not getting AC in two cases. I am getting NZEC for this two cases.

Here is the link to my solution, anyone please help me to figure out what is wrong in my solution.

The problem was with your IO (and might be with binary search, but not sure).

I have edited your binary search part (only a bit) + replaced IO with my template (feel free to copy, if you need) and here’s the link to your corrected solution.

Anyone please answer this.

@utkalsinha @vijju123 @kauts_kanu

Help me in solving this problem.

I am unable to make out why you are getting runtime error :confused: Everything looks fine to my eye.

@mathecodician

Please help me with this.

I’m having a look at your solution. (Expecting an index out of bounds error).

Meanwhile, you might try to find the bug using my java AC solution.