Ccircle code chef long challenge

link to my sol:-https://ide.codingblocks.com/s/35985
link to problem:-https://www.codechef.com/status/CCIRCLES
i am getting WA in first 3 cases cant figure out why