#include <bits/stdc++.h>
using namespace std;
struct node {
  int p, q;
};
int vis[200000 + 10];
node a[200000 + 10], b[200000 + 10];
int cmp(node x, node y) { return x.q < y.q; }
int main() {
  int n, k;
  memset(vis, 0, sizeof(vis));
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i].q);
    b[i].q = a[i].q;
    a[i].p = i;
    b[i].p = i;
  }
  sort(a + 1, a + 1 + n, cmp);
  vis[a[1].p] = 0;
  for (int i = 2; i <= n; i++) {
    if (a[i].q != a[i - 1].q)
      vis[a[i].p] = i - 1;
    else
      vis[a[i].p] = vis[a[i - 1].p];
  }
  for (int i = 0; i < k; i++) {
    int s1, s2;
    scanf("%d %d", &s1, &s2);
    if (b[s1].q > b[s2].q)
      vis[s1]--;
    else if (b[s1].q < b[s2].q)
      vis[s2]--;
  }
  for (int i = 1; i <= n; i++) {
    if (vis[i] < 0) vis[i] = 0;
    if (i != n)
      printf("%d ", vis[i]);
    else
      printf("%d\n", vis[i]);
  }
  return 0;
}
