func_code_string: #include <bits/stdc++.h>   using namespace std;   void readInput() {}   void solve() {}   priority_queue<pair<int, int>> pq;   int n, x, y, res, a[100004], b[100004], T, cnt, vitri[100004];   vector<int> pos[100004], ans;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     readInput();     solve();     cin >> T;     while (T--) {       cin >> n >> x >> y;       for (int i = 1; i <= n + 1; i++) {         pos[i].clear();         b[i] = 0;         vitri[i] = 0;       }       ans.clear();       while (!pq.empty()) pq.pop();       for (int i = 1; i <= n; i++) cin >> a[i], pos[a[i]].push_back(i);       cnt = 1;       for (int i = 1; i <= n + 1; i++) {         pq.push({pos[i].size(), i});         if (pos[i].size() == 0) res = i;       }       while (cnt <= x) {         pair<int, int> u = pq.top();         pq.pop();         b[pos[u.second].back()] = u.second;         vitri[pos[u.second].back()] = 1;         pos[u.second].pop_back();         cnt++;         pq.push({pos[u.second].size(), u.second});       }       pair<int, int> u = pq.top();       if (2 * u.first > n - x + n - y) {         cout <<  NO  <<   n ;         continue;       } else {         cout <<  YES  <<   n ;         for (int i = 1; i <= n + 1; i++) {           for (auto v : pos[i]) ans.push_back(v);         }         cnt = 1;         for (int i = 0; i < ans.size(); i++) {           b[ans[i]] = a[ans[(i + ans.size() / 2) % (ans.size())]];         }         cnt = 1;         for (int i = 1; i <= n; i++) {           if (vitri[i] == 0 && b[i] == a[i]) {             vitri[i] = 1;             cnt++;             b[i] = res;           }         }         for (int i = 1; i <= n; i++) {           if (vitri[i] == 0 && cnt <= n - y) b[i] = res, cnt++;         }         for (int i = 1; i <= n; i++) cout << b[i] <<    ;         cout <<   n ;       }     }   }   