Gennady Korotkevich's submission of The Gifting Problem | CodeChef