ELOMAX cannot figure out where the code is not working

Question https://www.codechef.com/submit/ELOMAX
solution https://www.codechef.com/viewsolution/37328120
I have first made a 2d array where rows are players and columns are months. While doing this I calculated the highest score month for each player.
then I calculated the rank of each player in first, second,…months.
finally, I calculated the highest rank month for each player. outputted the answer.
Thanks in advance!!