Hello All, I was trying to do an old problem Problem Link where I got the wrong answer for a testcase while submitting the solution and I ran the same testcase on few other compilers, I got the correct answer. Here are the links to results from ideone, codeforces, geeksforgeeks and (unable to attach image) for the solution Solution Link .
Please help if anyone knows the reason.