#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k, a[200000];
  cin >> n >> k;
  vector<int> v, ans(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    v.push_back(a[i]);
  }
  sort((v).begin(), (v).end());
  for (int i = 0; i < k; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    if (a[u] > a[v]) ans[u]--;
    if (a[u] < a[v]) ans[v]--;
  }
  for (int i = 0; i < n; i++) {
    int l = 0, r = n, m;
    while (l <= r) {
      m = (l + r) / 2;
      if (a[i] <= v[m])
        r = m - 1;
      else
        l = m + 1;
      if (m)
        if (v[m] == a[i] && v[m - 1] < a[i]) break;
    }
    cout << ans[i] + m << " ";
  }
  return 0;
}
