Could anyone explain whats wrong with my solution for problem IALG1? I have tested for a lot of test cases and my solution appears to be similar to the accepted ones.
Link to problem: https://www.codechef.com/INAL2019/problems/IALG1/
Link to my solution: https://www.codechef.com/viewsolution/22616349