func_code_string: #include <bits/stdc++.h>   using namespace std;   const int INF = 0x3f3f3f3f;   const long long INFF = 0x3f3f3f3f3f3f3f3fll;   const long long M = 1e9 + 7;   const long long maxn = 1e6 + 7;   const double pi = acos(-1.0);   const double eps = 0.00000001;   long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }   template <typename T>   inline T abs(T a) {     return a > 0 ? a : -a;   }   template <typename T>   inline T powMM(T a, T b) {     T ret = 1;     for (; b; b >>= 1ll, a = (long long)a * a % M)       if (b & 1) ret = (long long)ret * a % M;     return ret;   }   int A[maxn];   map<int, int> S;   vector<int> del, ini[2], have[2];   int cnt[2], ans;   int main() {     int n, m, i, j;     scanf( %d%d , &n, &m);     m = min(m, n * 2);     for (i = 1; i <= n; i++) scanf( %d , &A[i]);     for (i = 1; i <= n; i++) {       if (S.count(A[i])) {         del.push_back(i);         ans++;       } else {         S[A[i]] = i, cnt[A[i] & 1]++;         ini[A[i] & 1].push_back(i);       }     }     for (i = 0; i < 2; i++) {       sort(ini[i].begin(), ini[i].end());       for (j = 0; j < (int)ini[i].size() - n / 2; j++) {         S.erase(A[ini[i][j]]);         cnt[i]--;         ans++;         del.push_back(ini[i][j]);       }     }     j = 0;     for (i = 1; i <= m; i++) {       if (!S.count(i)) {         if (cnt[i & 1] != n / 2) {           cnt[i & 1]++;           A[del[j++]] = i;         }       }     }     if (cnt[0] != n / 2 || cnt[1] != n / 2) return 0 * puts( -1 );     printf( %d n , ans);     for (i = 1; i <= n; i++) printf( %d  , A[i]);     return 0;   }   