#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 12;
const int MOD = 998244353;
long long n, q, d, m, a[maxn + 3], b[maxn + 3], l[maxn + 3], r[maxn + 3];
int dem[maxn + 3];
int t, k;
string second[2003];
map<long long, long long> ma;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  cin >> n >> m;
  for (int i = 1; i <= n + m; ++i) cin >> a[i];
  vector<int> rider, drive, ans(m);
  for (int i = 1; i <= m + n; ++i) {
    cin >> t;
    if (t == 0)
      rider.push_back(a[i]);
    else
      drive.push_back(a[i]);
  }
  for (auto& x : rider) {
    int vt = lower_bound(drive.begin(), drive.end(), x) - drive.begin();
    if (vt == 0)
      ans[0]++;
    else {
      if (vt == m)
        ans[m - 1]++;
      else if (drive[vt] - x >= x - drive[vt - 1])
        ans[vt - 1]++;
      else
        ans[vt]++;
    }
  }
  for (auto& x : ans) cout << x << ' ';
}
