#include <bits/stdc++.h>
using namespace std;
int num[200000 + 300];
vector<int> driver;
vector<int> rider;
int cnt[200000 + 300];
int lower(int x) {
  int l = 0;
  int r = driver.size() - 1;
  int ans = -1;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (driver[mid] <= x) {
      ans = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return ans;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n + m; ++i) scanf("%d", &num[i]);
  for (int i = 1; i <= n + m; ++i) {
    int x;
    scanf("%d", &x);
    if (x == 1)
      driver.push_back(num[i]);
    else
      rider.push_back(num[i]);
  }
  for (int i = 0; i < rider.size(); ++i) {
    int pos = lower(rider[i]);
    if (pos == -1) {
      cnt[0]++;
      continue;
    }
    if (pos == driver.size() - 1) {
      cnt[driver.size() - 1]++;
      continue;
    }
    if (rider[i] - driver[pos] > driver[pos + 1] - rider[i])
      cnt[pos + 1]++;
    else
      cnt[pos]++;
  }
  for (int i = 0; i < driver.size(); ++i) printf("%d ", cnt[i]);
  printf("\n");
  return 0;
}
