#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define rep(i, n) for(int i = 0; i < (n); i++) template using vi = vector; template using vii = vector>; template using viii = vector>; template using viiii = vector>; using P = pair; void chmin(ll & x, ll y) { x = min(x, y); } void chmax(ll& x, ll y) { x = max(x, y); } int main() { int n, k; cin >> n >> k; vi a(n); rep(i, n) cin >> a[i]; vi b = a; sort(b.begin(), b.end()); int thre = b[k - 1]; string s; rep(i, n) { if (a[i] <= thre) s.push_back('x'); else s.push_back('o'); } vi ans; rep(i, n - 1) { if (s[i] == 'x' && s[i + 1] == 'o') ans.push_back(i + 2); } int sz = (int)ans.size(); cout << sz << endl; rep(i, sz) cout << ans[i] << " \n"[i == sz - 1]; if (sz == 0) cout << endl; return 0; }