I Dont know why my testcases are failing

i took the example and check the minimum it was getting the right answer where as when i tried to submit it shows wrong answer i checked the logic it was working fine for other cases as well.https://ide.codingblocks.com/s/593038