func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     vector<int> v;     int k, n, fl = 0;     cin >> n >> k;     v.resize(n);     for (int i = 0; i < n; ++i) {       cin >> v[i];       if (v[i] == k) fl = 1;     }     int ct = 0;     if (!fl) {       v.push_back(k);       ct++;       ++n;     }     sort(v.begin(), v.end());     int p, d = 1e9;     for (int i = 0; i < v.size(); ++i) {       if (k == v[i] && abs((n + 1) / 2 - (i + 1)) < d) {         p = i + 1;         d = abs((n + 1) / 2 - (i + 1));       }     }     while (p < (n + 1) / 2) {       ++ct;       ++p;       ++n;     }     while (p > (n + 1) / 2) {       ++ct;       ++n;     }     cout << ct;     return 0;   }   