Yordan Chaparov's submission of Protecting Sheep | CodeChef