Mayank Khetan's submission of Mahasena | CodeChef