HORSES - Wrong Answer , C

My solution to the problem HORSES is here
http://www.codechef.com/viewsolution/3107208

But after repeated attempts, I am unable to figure out my mistake leading to the Wrong Answer.
Can someone please guide me ?

The difference can be 999999999 which cannot fit in data type “int” so change the data type to long long int and the code accordingly

No need to change int its ok…just initialise min=1000000000 after the test case loop…
here is the acceepted code with modification…
http://www.codechef.com/viewsolution/3110633

Thanks for the reply. I made the changes accordingly, but I still end up getting wrong answer
http://www.codechef.com/viewsolution/3107535