Add solution for HORSES

http://www.codechef.com/problems/HORSES/