#include <bits/stdc++.h>
using namespace std;
int nextDriver(vector<pair<int, bool> >& data, int i) {
  while (i < data.size() - 1 && !data[i].second) i++;
  return i;
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, bool> > data(n + m);
  for (int i = 0; i < n + m; i++) {
    cin >> data[i].first;
  }
  for (int i = 0; i < n + m; i++) {
    cin >> data[i].second;
  }
  data.push_back({2e9 + 1, true});
  int current = 0;
  int driverActu = nextDriver(data, 0);
  int driverNext = nextDriver(data, driverActu + 1);
  for (int i = 0; i < n + m; i++) {
    if (abs(data[i].first - data[driverActu].first) >
        abs(data[i].first - data[driverNext].first)) {
      cout << current << " ";
      current = 0;
      driverActu = driverNext;
      driverNext = nextDriver(data, driverActu + 1);
      if (!data[i].second) current++;
    } else {
      if (!data[i].second) current++;
    }
  }
  cout << current << endl;
  return 0;
}
