Devansh Bajpai's submission of Mahasena | CodeChef