Somebody please help me identify what is wrong in the code. I am getting correct answer for all the testcases in my PC but incorrect on submitting it to codechef

Problem homepage


My implementation