#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long double EPS = 1e-7;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  vector<long long> x(n + m), t(n + m);
  for (long long& it : x) {
    cin >> it;
  }
  for (long long& it : t) {
    cin >> it;
  }
  vector<long long> ans(m, 0);
  vector<pair<long long, long long> > v;
  for (long long i = 0; i < n + m; ++i) {
    long long p = i;
    ++i;
    while (i < n + m && t[i] == 0) {
      ++i;
    }
    if (t[i] == 1 && t[p] == 1) {
      v.push_back({(x[p] + x[i]) / 2, 1});
    }
    --i;
  }
  for (long long i = 0; i < n + m; ++i) {
    if (t[i] == 0) {
      v.push_back({x[i], 0});
    }
  }
  sort(v.begin(), v.end());
  long long pp = 0;
  for (auto it : v) {
    long long t = it.second;
    if (t == 1) {
      ++pp;
    } else {
      ++ans[pp];
    }
  }
  for (long long it : ans) {
    cout << it << " ";
  }
  cout << endl;
  return 0;
}
