Mayank Gupta's submission of Mahasena | CodeChef