#include <bits/stdc++.h>
using namespace std;
struct ds {
  int num, id;
} a[200001];
int b[200001];
int c[200001];
bool cmp(ds a, ds b) {
  if (a.num == b.num) return a.id < b.id;
  return a.num < b.num;
}
int main() {
  int n, i, k, x, y;
  cin >> n >> k;
  memset(b, 0, sizeof(b));
  for (i = 1; i <= n; i++) {
    cin >> a[i].num;
    a[i].id = i;
  }
  for (i = 1; i <= k; i++) {
    cin >> x >> y;
    if (a[x].num > a[y].num) b[x]++;
    if (a[x].num < a[y].num) b[y]++;
  }
  sort(a + 1, a + 1 + n, cmp);
  for (i = 1; i <= n; i++) c[i] = a[i].num;
  for (i = 1; i <= n; i++) {
    int m = c[i];
    int t = lower_bound(c + 1, c + 1 + n, m) - c;
    b[a[i].id] = t - b[a[i].id] - 1;
  }
  cout << b[1];
  for (i = 2; i <= n; i++) cout << " " << b[i];
  cout << endl;
  return 0;
}
