diff --git a/AcWing/3988/3988.cpp b/AcWing/3988/3988.cpp new file mode 100644 index 00000000..2cdab528 --- /dev/null +++ b/AcWing/3988/3988.cpp @@ -0,0 +1,25 @@ +#include + +using namespace std; + +int n, k, i, a[105]; +map 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; +}