_Sam's submission of Divide the Set | CodeChef