HIR180's submission of Paying optimally | CodeChef