PAIR OF ROSES- Wrong Answer

The link of question is:
https://hack.codingblocks.com/contests/c/262/696
The link of my code:
http://ide.codingblocks.com/#/s/17271

My code is passing the given test cases but after submission it’s giving wrong answer.