#include using namespace std; using ll = long long; template istream& operator >> (istream& is, vector& vec) { for(T& x : vec) is >> x; return is; } template ostream& operator << (ostream& os, const vector& vec) { if(vec.empty()) return os; os << vec[0]; for(auto it = vec.begin(); ++it != vec.end(); ) os << ' ' << *it; return os; } int main(){ ios::sync_with_stdio(false); cin.tie(0); ll n, k; cin >> n >> k; vector a(n); cin >> a; ll ng = 0, ok = 1ll << 60, mid; while(ng + 1 < ok){ mid = (ok + ng) / 2; int cnt = 0; for(int i = 0; i < n; i++){ cnt += a[i] < mid; } (cnt >= k ? ok : ng) = mid; } vector ans; for(int i = 0; i + 1 < n; i++){ if(a[i] < ok && ok <= a[i + 1]) ans.push_back(i + 2); } cout << ans.size() << '\n' << ans << '\n'; }