#include using namespace std; int main() { int n, k; cin >> n >> k; vector a(n); for (int j = 0; j < n; j++) cin >> a[j]; int r = 1000000000, l = 1; int now; while (r > l) { now = (r + l) / 2; int count = 0; for (int j : a) { if (j <= now) count++; } if (count == k) break; else if (count < k) { l = now + 1; } else { r = now; } } vector ans(0); for (int j = 1; j < n; j++) { if (a[j - 1] <= now && a[j] > now) { ans.push_back(j + 1); } } cout << ans.size() << endl; if (ans.size() == 0) cout << "\n"; for (int i=0; i