Shivam Mahendru's submission of A Balanced Contest | CodeChef