Sanjeet Mahato's submission of Bags and Balls | CodeChef