func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m, k, s, a[500009], b[500009];   int chk[500009];   bool ok(int p) {     vector<int> c(500009);     for (int i = 0; i <= p; i++) c[a[i]]++;     for (int i = 0; i < 500009; i++)       if (c[i] < chk[i]) return false;     return true;   }   int main() {     ios_base::sync_with_stdio(false);     cout.tie(0);     cin.tie(0);     cin >> m >> k >> n >> s;     for (int i = 0; i < m; i++) cin >> a[i];     for (int i = 0; i < s; i++) cin >> b[i], chk[b[i]]++;     int l = 0, r = m - 1;     if (!ok(r)) {       cout << -1;       return 0;     }     while (l < r) {       int mid = (l + r) >> 1;       if (ok(mid)) {         r = mid;       } else {         l = mid + 1;       }     }     vector<pair<int, int>> cut;     vector<int> chkk(500009);     r = max(r, k - 1);     for (int i = 0; i <= r; i++) chkk[a[i]]++;     for (int i = 0; i < m; i++) {       cut.push_back(make_pair(i, r));       chkk[a[i]]--;       while (r + 1 < m && (chkk[a[i]] < chk[a[i]] || r - i < k)) {         chkk[a[++r]]++;       }       if (chkk[a[i]] < chk[a[i]] || r - i < k) {         break;       }     }     int fid = -1;     for (int i = 0; i < cut.size(); i++) {       if (cut[i].first / k + 1 + (m - cut[i].second - 1) / k >= n) {         fid = i;         break;       }     }     if (fid == -1) {       cout << -1;       return 0;     }     vector<int> ans;     for (int i = cut[fid].first; i <= cut[fid].second; i++) {       if (chk[a[i]] != 0) {         chk[a[i]]--;       } else {         ans.push_back(i);       }     }     cout << cut[fid].second - cut[fid].first + 1 - k + (cut[fid].first % k)          <<   n ;     for (int i = 0; i < cut[fid].first % k; i++) cout << i + 1 <<    ;     for (int i = 0; i < cut[fid].second - cut[fid].first + 1 - k; i++) {       cout << ans[i] + 1 <<    ;     }   }   