Dinesh Goyal's submission of Profitable Paths 2 | CodeChef