#include <bits/stdc++.h>
using namespace std;
long long n, m, k, x, y;
long long r[500000];
long long pre[500000];
long long dup[500000];
long long res[500000];
long long down[500000];
long long binarySearch(long long x) {
  int l = 1, r = n, mid, bst = -1;
  while (l <= r) {
    mid = (l + r + 1) / 2;
    if (dup[mid - 1] > x)
      r = mid - 1;
    else if (dup[mid - 1] < x)
      l = mid + 1;
    else {
      bst = mid - 1;
      r = mid - 1;
    }
  }
  return bst;
}
void downIt(long long i, long long j) {
  if (r[j] < r[i])
    down[i]++;
  else if (r[j] > r[i])
    down[j]++;
}
int main() {
  cin >> n >> k;
  for (long long i = 0; i < n; i++) {
    cin >> r[i];
    dup[i] = r[i];
  }
  for (long long i = 0; i < k; i++) {
    cin >> x >> y;
    downIt(x - 1, y - 1);
  }
  sort(dup, dup + n);
  for (long long i = 0; i < n; i++) {
    long long indexInNoDup = binarySearch(r[i]);
    res[i] += indexInNoDup;
  }
  for (long long i = 0; i < n; i++)
    cout << ((res[i] - down[i] > 0) ? res[i] - down[i] : 0) << " ";
  return 0;
}
