Rohan Garg's submission of Mahasena | CodeChef