Dis_carea's submission of Mahasena | CodeChef