Nimesh Solanki's submission of Mahasena | CodeChef