#include <bits/stdc++.h>
using namespace std;
struct p {
  int v, f;
} a[200005];
int ans[200005];
int v[200005];
bool cmp(p a, p b) { return a.v < b.v; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  while (cin >> n >> m) {
    memset(ans, 0, sizeof(ans));
    for (int i = 1; i <= n; i++) {
      cin >> a[i].v;
      a[i].f = i;
    }
    for (int i = 0; i < m; i++) {
      int x, y;
      cin >> x >> y;
      if (a[x].v > a[y].v)
        --ans[x];
      else if (a[x].v < a[y].v)
        --ans[y];
    }
    sort(a + 1, a + n + 1, cmp);
    for (int i = 1; i <= n; i++) v[i] = a[i].v;
    for (int i = 1; i <= n; i++) {
      int pos = lower_bound(v + 1, v + 1 + n, a[i].v) - v;
      ans[a[i].f] = pos + ans[a[i].f] - 1;
      if (ans[a[i].f] < 0) ans[a[i].f] = 0;
    }
    for (int i = 1; i < n; i++) cout << ans[i] << " ";
    cout << ans[n] << endl;
  }
}
