Gennady Korotkevich's submission of Random Grouping | CodeChef