#include <bits/stdc++.h>
using namespace std;
typedef struct node {
  int x, num, No;
} node;
int cmp1(node a, node b) {
  if (a.x == b.x) {
    return a.No < b.No;
  }
  return a.x < b.x;
}
int cmp2(node a, node b) { return a.No < b.No; }
int main() {
  int n, m;
  while (~scanf("%d%d", &n, &m)) {
    node a[200050];
    int b[200050] = {0};
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i].x);
      b[i] = a[i].x;
      a[i].num = 0;
      a[i].No = i;
    }
    int u, v;
    while (m--) {
      scanf("%d%d", &u, &v);
      if (a[u - 1].x > a[v - 1].x) {
        a[u - 1].num--;
      } else if (a[u - 1].x < a[v - 1].x) {
        a[v - 1].num--;
      }
    }
    sort(a, a + n, cmp1);
    sort(b, b + n);
    for (int i = 0; i < n; i++) {
      a[i].num += (lower_bound(b, b + n, a[i].x) - b);
    }
    sort(a, a + n, cmp2);
    for (int i = 0; i < n; i++) {
      printf("%d%c", a[i].num, i == n - 1 ? '\n' : ' ');
    }
  }
  return 0;
}
