#include <bits/stdc++.h>
using namespace std;
long long x[300000];
int t;
vector<long long> khach, taxi;
long long dem = 0, j = 0;
long long n, m;
int main() {
  ios_base::sync_with_stdio(NULL), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (long long i = 0; i < m + n; i++) cin >> x[i];
  for (long long i = 0; i < m + n; i++) {
    cin >> t;
    if (t == 0)
      khach.push_back(x[i]);
    else
      taxi.push_back(x[i]);
  }
  long long s = khach.size();
  long long i = 0;
  for (i = 0; i < taxi.size() - 1;) {
    if (fabs(taxi[i] - khach[j]) <= fabs(taxi[i + 1] - khach[j]) && j < s) {
      dem++;
      j++;
    } else {
      cout << dem << " ";
      dem = 0;
      i++;
    }
  }
  if (i < taxi.size() - 1) {
    for (long long k = 0; k < taxi.size() - i; k++) cout << 0 << " ";
  } else {
    cout << s - j;
  }
  return 0;
}
