0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-23 20:48:48 +00:00
Baoshuo Ren 2021-09-25 20:06:12 +08:00 committed by Baoshuo Ren
parent 4370ffb409
commit 317db1d887
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

25
AcWing/3988/3988.cpp Normal file
View File

@ -0,0 +1,25 @@
#include <bits/stdc++.h>
using namespace std;
int n, k, i, a[105];
map<int, int> b;
int main() {
cin >> n >> k;
for (int i = 1; i <= n; i++) {
cin >> a[i];
b[a[i]] = i;
}
if (b.size() < k) {
cout << "NO" << endl;
} else {
cout << "YES" << endl;
for (auto it : b) {
cout << it.second << ' ';
if (++i >= k) break;
}
cout << endl;
}
return 0;
}