#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  srand(clock());
  long long n, m;
  cin >> n >> m;
  vector<long long> xx(n + m);
  vector<long long> t(n + m);
  vector<long long> x1;
  vector<long long> x2;
  for (long long i = 0; i < n + m; ++i) {
    cin >> xx[i];
  }
  for (long long i = 0; i < n + m; ++i) {
    cin >> t[i];
    if (t[i]) {
      x2.push_back(xx[i]);
    } else {
      x1.push_back(xx[i]);
    }
  }
  long long k = 0;
  vector<long long> ans(m);
  for (long long i = 0; i < n; ++i) {
    while (k != m - 1 && abs(x1[i] - x2[k]) > abs(x1[i] - x2[k + 1])) {
      ++k;
    }
    ++ans[k];
  }
  for (auto el : ans) {
    cout << el << " ";
  }
  return 0;
}
