Marcin's submission of Profitable Paths 2 | CodeChef