CF988A Diverse Team

题目描述

给定n和k和n个元素的数列,请在这个数列中找k个不同的元素。 如果可行,则输出“YES”和其中一个答案(可能有多个答案)的元素编号。 否则输出“NO”。 感谢@南方不败 提供翻译

输入格式

第一行n和k,第二行n个数。

输出格式

If it is impossible to form a suitable team, print "NO" (without quotes). Otherwise print "YES", and then print $ k $ distinct integers from $ 1 $ to $ n $ which should be the indices of students in the team you form. All the ratings of the students in the team should be distinct. You may print the indices in any order. If there are multiple answers, print any of them. Assume that the students are numbered from $ 1 $ to $ n $ .

说明/提示

All possible answers for the first example: - {1 2 5} - {2 3 5} - {2 4 5} Note that the order does not matter.