#include <bits/stdc++.h>
using namespace std;
long long a[200005], b[200005], c[200005];
long long sol(long long p, long long n) {
  long long ans = 0;
  long long lo = 1, hi = n, mid;
  while (lo <= mid) {
    mid = (hi + lo) / 2;
    if (a[mid] < p) {
      lo = mid + 1;
      ans = mid;
    } else {
      hi = mid - 1;
    }
  }
  return ans;
}
int main() {
  long long i, j, k, p, q, m, n;
  cin >> n >> m;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    c[i] = a[i];
  }
  sort(a + 1, a + 1 + n);
  for (i = 1; i <= n; i++) {
    b[i] = upper_bound(a + 1, a + n, c[i] - 1) - a - 1;
  }
  for (i = 1; i <= m; i++) {
    cin >> p >> q;
    if (c[p] > c[q]) b[p]--;
    if (c[q] > c[p]) b[q]--;
  }
  for (i = 1; i <= n; i++) {
    cout << b[i] << " ";
  }
  cout << endl;
  return 0;
}
