Zhenyang Dai's submission of Paying optimally | CodeChef