JAY KUMAR's submission of Mahasena | CodeChef