#include <bits/stdc++.h>
using namespace std;
const long long maxN = 1e6 + 5;
const long long inf = 1e10;
const long long mod = 1e9 + 7;
struct data {
  long long index;
  long long value;
  long long res;
  bool operator<(const data &o) const { return value < o.value; }
};
long long n, k, x, y;
data a[maxN];
long long kq[maxN];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i].value;
    a[i].index = i;
  }
  for (long long i = 1; i <= k; i++) {
    cin >> x >> y;
    if (a[x].value > a[y].value) {
      a[x].res--;
    } else if (a[x].value < a[y].value) {
      a[y].res--;
    }
  }
  sort(a + 1, a + 1 + n);
  long long i = 1;
  while (i <= n) {
    long long tmp = i - 1;
    long long val = a[i].value;
    while (a[i].value == val && i <= n) {
      a[i].res += tmp;
      i++;
    }
  }
  for (long long i = 1; i <= n; i++) {
    kq[a[i].index] = a[i].res;
  }
  for (long long i = 1; i <= n; i++) cout << kq[i] << " ";
  return 0;
}
