#include <bits/stdc++.h>
using namespace std;
int n, k;
struct no {
  int id, nl;
} a[1100000];
int row[1100000], ct[1100000];
int cmp(no a, no b) { return a.nl < b.nl; }
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i].nl), a[i].id = i;
  for (int i = 1; i <= k; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (a[x].nl > a[y].nl) ct[x]++;
    if (a[x].nl < a[y].nl) ct[y]++;
  }
  sort(a + 1, a + 1 + n, cmp);
  for (int i = 2; i <= n; i++) {
    if (a[i].nl > a[i - 1].nl)
      row[a[i].id] = i - 1;
    else
      row[a[i].id] = row[a[i - 1].id];
  }
  for (int i = 1; i <= n; i++) printf("%d ", row[i] - ct[i]);
}
