#include <bits/stdc++.h>
using namespace std;
int r[212345];
int aux[212345];
vector<int> cmps[212345];
int ans[212345];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> r[i];
    aux[i] = r[i];
  }
  sort(aux + 1, aux + 1 + n);
  for (int i = 1; i <= n; ++i) {
    int* v = lower_bound(aux + 1, aux + n + 1, r[i]);
    if (*v == r[i]) --v;
    ans[i] = v - aux;
  }
  for (int i = 0; i < k; ++i) {
    int a, b;
    cin >> a >> b;
    if (r[a] > r[b]) {
      --ans[a];
    } else if (r[b] > r[a]) {
      --ans[b];
    }
  }
  for (int i = 1; i <= n; ++i) {
    cout << ans[i] << ' ';
  }
  cout << '\n';
  return 0;
}
