func_code_string: #include <bits/stdc++.h>   using namespace std;   struct node {     int x;     int i;   };   node a[300010];   int b[300010];   map<int, int> mp;   bool cmp(node p, node q) { return (p.x < q.x); }   int main() {     int x, y, i, j, n, k;     cin >> n;     for (i = 0; i < n; i++) {       cin >> a[i].x;       mp[a[i].x]++;       a[i].i = i;     }     sort(a, a + n, cmp);     for (i = 0, j = 1; i < n; i++) {       if (i == 0)         b[a[i].i] = a[i].x;       else if ((a[i].x == a[i - 1].x)) {         j = max(j, a[i].x + 1);         while (1) {           if (j <= a[i].x || mp[j] > 0) {             j++;             continue;           }           break;         }         b[a[i].i] = j;         mp[j]++;       } else {         b[a[i].i] = a[i].x;       }     }     for (i = 0; i < n; i++) cout << b[i] <<    ;     return 0;   }   