func_code_string: #include <bits/stdc++.h>   const int N = 1e6 + 7;   const int INF = 0x3f3f3f3f;   const int mod = 1e9 + 7;   const double eps = 1e-7;   using namespace std;   int a[N], s[N];   map<int, int> asum, ssum;   map<int, vector<int> > pos;   map<int, int> size;   int main() {     int n, m, k, S;     cin >> m >> k >> n >> S;     for (int i = 1; i <= m; i++) {       scanf( %d , a + i);       asum[a[i]]++;     }     for (int i = 1; i <= S; i++) {       scanf( %d , s + i);       ssum[s[i]]++;     }     for (int i = 1; i <= m; i++) {       if (ssum[a[i]] > 0) {         pos[a[i]].push_back(i);       }     }     for (auto x : ssum) {       if (asum[x.first] < x.second) {         puts( -1 );         return 0;       }     }     for (auto x : pos) {       size[x.first] = x.second.size();     }     int p, q, l, r, minl, maxr;     bool f;     bool flag = 1;     for (int num = 1; num <= n; num++) {       p = (num - 1) * k;       f = 0;       minl = INF;       maxr = -1;       for (auto x : pos) {         q = upper_bound(x.second.begin(), x.second.end(), p) - x.second.begin();         if (q + ssum[x.first] > size[x.first]) {           f = 1;           break;         }         minl = min(minl, x.second[q]);         maxr = max(maxr, x.second[q + ssum[x.first] - 1]);       }       if (f) break;       if (m - maxr < (n - num) * k)         continue;       else {         printf( %d n , max(0, maxr - p - k));         int cnt = maxr - p;         bool ff = 1;         for (int i = p + 1; i <= maxr; i++) {           if (cnt <= k) break;           if (ssum[a[i]] == 0) {             printf( %s%d , ff ?    :    , i);             cnt--;             ff = 0;           } else {             ssum[a[i]]--;           }         }         cout << endl;         flag = 0;         break;       }     }     if (flag) puts( -1 );     return 0;   }   