#include <bits/stdc++.h>
using namespace std;
typedef struct {
  long long int x, take = 0, lp;
  bool t = 0;
} men;
int main() {
  int a, b;
  men ta;
  bool ca;
  while (cin >> a >> b) {
    long long int po = -999999;
    vector<men> arr;
    vector<int> dri;
    map<long long int, long long int> drix;
    for (int i = 0; i < a + b; i++) {
      cin >> ta.x;
      arr.push_back(ta);
    }
    for (int i = 0; i < a + b; i++) {
      cin >> ca;
      arr[i].t = ca;
      arr[i].lp = po;
      if (ca) {
        po = arr[i].x;
        dri.push_back(arr[i].x);
        drix[arr[i].x] = 0;
      }
    }
    for (int i = 0; i < a + b; i++) {
      if (arr[i].t) continue;
      long long int aaa =
          arr[i].lp < 0 ? 9999999999 : abs(arr[i].x - arr[i].lp);
      long long int ttt = *upper_bound(dri.begin(), dri.end(), arr[i].x);
      long long int bbb =
          upper_bound(dri.begin(), dri.end(), arr[i].x) == dri.end()
              ? 99999999999
              : abs(ttt - arr[i].x);
      if (aaa <= bbb) {
        drix[arr[i].lp]++;
      } else if (bbb < aaa) {
        drix[ttt]++;
      }
    }
    map<long long int, long long int>::iterator iter;
    for (iter = drix.begin(); iter != drix.end(); iter++)
      cout << iter->second << " ";
    cout << endl;
  }
  return 0;
}
