#include <bits/stdc++.h>
using namespace std;
long long int a[200005];
long long int s[200005];
long long int ans[200005];
int n, k;
int main() {
  int n, k, i;
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    s[i] = a[i];
  }
  std::sort(s + 1, s + n + 1);
  for (i = 1; i <= n; i++) {
    int p = std::lower_bound(s + 1, s + n + 1, a[i]) - s;
    ans[i] = p - 1;
  }
  while (k--) {
    int k1, k2;
    cin >> k1 >> k2;
    if (a[k1] == a[k2]) continue;
    if (a[k1] > a[k2])
      ans[k1]--;
    else
      ans[k2]--;
  }
  cout << ans[1] << " ";
  for (i = 2; i <= n; i++) cout << ans[i] << " ";
  printf("\n");
  return 0;
}
