Gennady Korotkevich's submission of Curious Queries | CodeChef