Gennady Korotkevich's submission of Connecting Soldiers | CodeChef