func_code_string: #include <bits/stdc++.h>   using namespace std;   long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }   const int MAXN = 100000;   int n;   int x[MAXN];   int ret[MAXN];   bool used[MAXN + 1];   void run() {     scanf( %d , &n);     for (int i = (0); i < (n); ++i) scanf( %d , &x[i]);     memset(ret, -1, sizeof(ret));     memset(used, false, sizeof(used));     for (int i = (0); i < (n); ++i)       if (1 <= x[i] && x[i] <= n && !used[x[i]]) ret[i] = x[i], used[x[i]] = true;     int at = 1;     for (int i = (0); i < (n); ++i)       if (ret[i] == -1) {         while (used[at]) ++at;         ret[i] = at++;       }     for (int i = (0); i < (n); ++i) {       if (i != 0) printf(   );       printf( %d , ret[i]);     }     puts(  );   }   int main() {     run();     return 0;   }   