Is mirror inverse problem

Problem link : https://hack.codingblocks.com/contests/c/509/184
my code : https://ide.codingblocks.com/#/s/28778

Only 2 test caes pass

https://ide.codingblocks.com/#/s/28885

i have made the changes and commented the mistakes.