#include <bits/stdc++.h>
int a[200010];
struct ele {
  int x, id;
} c[200010];
bool cmp(ele p, ele q) { return p.x < q.x; }
int ans[200010];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int k = 1; k <= n; k++) scanf("%d", &a[k]);
  for (int k = 1; k <= n; k++) {
    c[k].x = a[k];
    c[k].id = k;
  }
  std::sort(c + 1, c + n + 1, cmp);
  for (int k = 1; k <= n; k++) {
    if (k == 1) {
      ans[c[k].id] = 0;
      continue;
    }
    if (c[k].x != c[k - 1].x) {
      ans[c[k].id] = k - 1;
    } else {
      ans[c[k].id] = ans[c[k - 1].id];
    }
  }
  for (int k = 1; k <= m; k++) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (a[x] > a[y]) ans[x]--;
    if (a[y] > a[x]) ans[y]--;
  }
  for (int k = 1; k <= n; k++) printf("%d ", ans[k]);
}
