Help in spoj question : DYZIO

Question link :- http://www.spoj.com/problems/DYZIO/
Solution link :- https://ide.codingblocks.com/#/s/8940

Hey i have tried many testcases and getting correct answer for all of them but still getting wrong answer on submitting it.

@vijju123 plzz if anyone can help me out!!