Mark Kornejchik's submission of Optimal Subset | CodeChef