#include <bits/stdc++.h>
using namespace std;
long long int ar[500005], br[500005], pos[500005];
struct st {
  long long int a, b, c;
};
st pa[500005];
bool com(st x, st y) { return x.a < x.b; }
string s, ss;
int main() {
  long long i, j, n, k, a, b = 0, x = 0, y = 0, yy = -1, d;
  cin >> n >> k;
  for (i = 0; i < n + k; i++) cin >> pos[i];
  for (i = 0; i < n + k; i++) {
    cin >> a;
    pa[i].a = pos[i];
    pa[i].b = a;
  }
  for (i = 0; i < n + k; i++) {
    a = pa[i].b;
    if (a == 1) {
      br[i] = 1;
      if (yy != -1) {
        for (j = yy + 1; j < i; j++) {
          if (pos[j] - pos[yy] <= pos[i] - pos[j])
            ar[yy]++;
          else
            ar[i]++;
        }
        yy = i;
        x = 0;
      } else {
        ar[i] += x;
        yy = i;
        x = 0;
      }
    } else {
      x++;
    }
  }
  if (x) ar[yy] += x;
  for (i = 0; i <= n + k; i++) {
    if (br[i]) cout << ar[i] << " ";
  }
  return 0;
}
