#include <bits/stdc++.h>
using namespace std;
struct driver {
  int p, v;
};
driver ans[200200];
int n, m, a[200200], nans, t[200200];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n + m; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n + m; i++) scanf("%d", &t[i]);
  a[n + m + 1] = 2000000100;
  for (int i = 1; i <= n + m + 1; i++) {
    if ((t[i] == 1) || (i == n + m + 1)) {
      nans++;
      ans[nans].p = a[i];
      ans[nans].v = 0;
      for (int j = i - 1; j >= 1; j--) {
        if (t[j] == 1)
          break;
        else if ((nans == 1) || (a[i] - a[j] < a[j] - ans[nans - 1].p))
          ans[nans].v++;
        else
          ans[nans - 1].v++;
      }
    }
  }
  for (int i = 1; i < nans; i++) printf("%d ", ans[i].v);
  printf("\n");
  return 0;
}
