_Sam's submission of Partition the Graph | CodeChef