#include <bits/stdc++.h>
using namespace std;
struct node {
  int num, pos, ans;
} r[2000000 + 5];
bool cmp(node s1, node s2) { return s1.num < s2.num; }
bool cmp2(node s1, node s2) { return s1.pos < s2.pos; }
int n, k, eq, u, v;
int cnt[2000000 + 5];
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &r[i].num);
    r[i].pos = i;
  }
  for (int i = 1; i <= k; i++) {
    scanf("%d%d", &u, &v);
    if (r[u].num > r[v].num) cnt[u]++;
    if (r[v].num > r[u].num) cnt[v]++;
  }
  sort(r + 1, r + n + 1, cmp);
  for (int i = 1; i <= n; i++) {
    if (r[i].num == r[i - 1].num && i != 1)
      eq++;
    else
      eq = 0;
    r[i].ans = i - 1 - eq - cnt[r[i].pos];
  }
  sort(r + 1, r + n + 1, cmp2);
  for (int i = 1; i <= n; i++) printf("%d ", r[i].ans);
}
