HIR180's submission of Optimal Trip | CodeChef