#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long t, n, i, j, m;
  cin >> n >> m;
  long long arr[n + 5];
  long long ans[n + 5];
  vector<pair<long long, long long>> vect;
  for (i = 1; i <= n; i++) {
    cin >> j;
    arr[i] = j;
    vect.push_back({j, i});
    ans[i] = 0;
  }
  sort(vect.begin(), vect.end());
  vector<long long> quaralled[n + 5];
  for (i = 0; i < m; i++) {
    long long u, v;
    cin >> u >> v;
    if (arr[u] < arr[v])
      ans[v]--;
    else if (arr[v] < arr[u])
      ans[u]--;
  }
  for (i = 1; i <= n; i++) {
    long long s, m, e, v;
    s = 0;
    e = n - 1;
    v = -1;
    while (s <= e) {
      m = (s + e) / 2;
      if (vect[m].first < arr[i]) {
        v = m;
        s = m + 1;
      } else
        e = m - 1;
    }
    ans[i] += v + 1;
  }
  for (i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << endl;
}
