Vivek Ghosh's submission of Mahasena | CodeChef