Andrey Kim's submission of Greedy puppy | CodeChef