func_code_string: #include <bits/stdc++.h>   using namespace std;   #pragma comment(linker,  /STACK:16777216 )   const char DEBUG = 0;   mt19937 gen(chrono::high_resolution_clock::now().time_since_epoch().count());   struct pp {     int pos, id;   };   long long pos[200000];   int type[200000];   int res[100000];   vector<int> arr;   int get_id1(int x) {     int l = 0, r = arr.size();     while (r - l > 1) {       int m = (l + r) / 2;       if (arr[m] >= x)         r = m;       else         l = m;     }     return l;   }   int get_id2(int x) {     int l = -1, r = arr.size() - 1;     while (r - l > 1) {       int m = (l + r) / 2;       if (arr[m] <= x)         l = m;       else         r = m;     }     return r;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cin.sync_with_stdio(0);     cout.tie(0);     cout.sync_with_stdio(0);     int n, m;     cin >> n >> m;     for (int i = 0; i < n + m; i++) cin >> pos[i];     for (int i = 0; i < n + m; i++) cin >> type[i];     for (int i = 0; i < n + m; i++)       if (type[i]) arr.push_back(pos[i]);     for (int i = 0; i < n + m; i++) {       if (type[i]) continue;       long long d1 = 1000000000000000000LL, d2 = 1000000000000000000LL;       int p1 = get_id1(pos[i]);       int p2 = get_id2(pos[i]);       d1 = abs(arr[p1] - pos[i]);       d2 = abs(arr[p2] - pos[i]);       if (d1 < d2)         res[p1]++;       else if (d2 < d1)         res[p2]++;       else {         if (arr[p1] < arr[p2])           res[p1]++;         else           res[p2]++;       }     }     for (int i = 0; i < m; i++) cout << res[i] <<    ;     return 0;   }   