Dhruv Patel's submission of Mahasena | CodeChef