Mark Kornejchik's submission of Weird Competition | CodeChef