#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  ;
  int n, k, i, j, u, vv;
  cin >> n >> k;
  vector<pair<int, int>> a;
  vector<int> v[n + 1];
  for (i = 0; i < n; i++) {
    cin >> j;
    a.push_back({j, i + 1});
  }
  for (i = 0; i < k; i++) {
    cin >> u >> vv;
    if (a[u - 1].first > a[vv - 1].first) v[u].push_back(vv);
    if (a[vv - 1].first > a[u - 1].first) v[vv].push_back(u);
  }
  sort(a.begin(), a.end());
  int ans[n + 1];
  for (i = 0; i < n; i++) {
    if (i == 0) {
      ans[a[i].second] = 0;
      j = i;
      continue;
    }
    if (a[i].first == a[i - 1].first) {
      k = a[i].second;
      ans[k] = j - v[k].size();
      continue;
    }
    k = a[i].second;
    j = i;
    ans[k] = i - v[k].size();
  }
  for (i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
