#include <bits/stdc++.h>
using namespace std;
int n, m, d[200005], ans[200005];
int read() {
  int x = 0, c;
  while (!isdigit(c = getchar()))
    ;
  while (x = x * 10 + c - '0', isdigit(c = getchar()))
    ;
  return x;
}
struct node {
  int x, id;
} a[200005];
bool cmp(node x, node y) { return x.x < y.x; }
int main() {
  n = read();
  m = read();
  for (int i = 1; i <= n; i++) a[i].x = read(), a[i].id = i;
  for (int i = 1; i <= m; i++) {
    int x = read(), y = read();
    if (a[x].x < a[y].x)
      d[y]++;
    else if (a[x].x > a[y].x)
      d[x]++;
  }
  sort(a + 1, a + n + 1, cmp);
  int tmp = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i].x != a[tmp].x)
      ans[a[i].id] = i - 1, tmp = i;
    else
      ans[a[i].id] = tmp - 1;
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i] - d[i]);
  return 0;
}
