#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
const double eps = 1e-8;
int a[maxn], ans[maxn], i, b[maxn], cnt[maxn];
int main() {
  int n, m;
  while (~scanf("%d %d", &n, &m)) {
    for (i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      b[i] = a[i];
    }
    int u, v;
    sort(a + 1, a + n + 1);
    memset(cnt, 0, sizeof(cnt));
    for (i = 1; i <= m; i++) {
      scanf("%d %d", &u, &v);
      if (b[u] > b[v])
        cnt[u]++;
      else if (b[u] < b[v])
        cnt[v]++;
    }
    for (i = 1; i <= n; i++) {
      ans[i] = lower_bound(a + 1, a + n + 1, b[i]) - a - 1 - cnt[i];
      cout << ans[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
