getting Wrong answer in HORSES

Need to know where is my code failing

Solution is present at the following location

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

Each output should be on the new lineā€¦

You missed to print a new line after the output.

Suggestion:
(1) there is inbuilt sort function available in c++ which you can use instead of writing the whole function

1 Like