Dinesh Goyal's submission of Mahasena | CodeChef