func_code_string: #include <bits/stdc++.h>   using namespace std;   const int DX[8] = {1, -1, 0, 0, 1, 1, -1, -1};   const int DY[8] = {0, 0, 1, -1, 1, -1, 1, -1};   const int intmax = 0x7fffffff;   map<int, int> mp;   int main() {     int n;     scanf( %d , &n);     for (int i = 0; i < n; i++) {       int a;       scanf( %d , &a);       mp[a]++;     }     map<int, int>::iterator it = mp.begin();     int deg = (it->second) * 2;     int last = it->first;     it++;     for (; it != mp.end(); it++) {       if ((it->first) != last + 1) {         puts( NO );         return 0;       }       if (!deg) {         puts( NO );         return 0;       }       deg = it->second * 2 - deg;       if (deg < 0) {         puts( NO );         return 0;       }       last = it->first;     }     if (!deg)       puts( YES );     else       puts( NO );   }   