func_code_string: #include <bits/stdc++.h>   using namespace std;   const int inf = 1e9;   const long long INF = 1e18;   const int M = 1e9 + 7;   const int maxn = 1e6;   int b[maxn], c[maxn];   signed main() {     ios::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     cout.setf(ios::fixed);     cout.precision(10);     int m, k, n, s;     cin >> m >> k >> n >> s;     vector<int> a(m);     for (int i = 0; i < m; ++i) {       cin >> a[i];     }     for (int i = 0; i < s; ++i) {       int x;       cin >> x;       ++b[x];     }     int res = inf;     int l = 0, r = 0, cnt = 0;     int L = 0, R = 0;     while (r < m) {       while (r < m && cnt < s) {         if (c[a[r]] < b[a[r]]) {           ++cnt;         }         ++c[a[r]];         ++r;       }       while (l < m && cnt == s) {         int tl = l / k, tr = (r - 1) / k;         int tot;         if (tl == tr) {           tot = 0;         } else {           tot = r - tl * k - k;         }         if (tot < res) {           L = l;           R = r - 1;           res = tot;         }         c[a[l]]--;         if (c[a[l]] < b[a[l]]) {           --cnt;         }         ++l;       }     }     if ((m - res) / k < n) {       cout << -1 << endl;     } else {       cout << res << endl;       for (int i = R; i >= L - L % k; --i) {         if (res == 0) break;         if (!b[a[i]]) {           cout << i + 1 <<    ;           --res;         } else {           --b[a[i]];         }       }     }     return 0;   }   