Gold grid wrong answer

i am getting wa verdict, i checked the editorial and they have done the same thing as me. please tell me what’d i do wrong.
link to code ->https://ide.codingblocks.com/s/133870