#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
bool cmp(pair<int, int> a, pair<int, int> b) { return a.second < b.second; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> temp(n + m), a, b, ans(m, 0);
  for (int i = 0; i < n + m; ++i) cin >> temp[i];
  for (int i = 0; i < n + m; ++i) {
    int x;
    cin >> x;
    if (x == 1)
      b.push_back(temp[i]);
    else
      a.push_back(temp[i]);
  }
  for (int i = 0; i < n; ++i) {
    int pos = (int)(lower_bound(b.begin(), b.end(), a[i]) - b.begin());
    if (pos == m) {
      ans[m - 1]++;
    } else if (pos == 0) {
      ans[0]++;
    } else {
      if (b[pos] - a[i] < a[i] - b[pos - 1])
        ans[pos]++;
      else
        ans[pos - 1]++;
    }
  }
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
