Racing Horses - Please help me to identify the issue with my code

https://www.codechef.com/viewsolution/20227157

Everything looks alright to me but it doesn’t pass. Can someone please help what’s the issue with my solution

notice the maximum size of skill values.

Your logic seems fine. Pay attention to the constraints given in the problem.

Try to make an array of long long int datatype instead of just int.