#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m, i, j, k, a, b, id, w, x;
  cin >> n >> m;
  vector<int> r(n + 1), ans(n + 1), q(n + 1, 0);
  vector<pair<int, int>> plist;
  vector<pair<int, int>>::iterator it;
  for (i = 1; i <= n; i++) {
    cin >> r[i];
    plist.push_back({r[i], i});
  }
  for (i = 0; i < m; i++) {
    cin >> a >> b;
    if (r[a] > r[b]) q[a]++;
    if (r[a] < r[b]) q[b]++;
  }
  sort(plist.begin(), plist.end());
  for (i = 0; i < n; i++) {
    id = plist[i].second;
    w = plist[i].first;
    it = lower_bound(plist.begin(), plist.end(), make_pair(w, 0));
    if (it == plist.begin())
      ans[id] = 0;
    else {
      x = (it - plist.begin());
      ans[id] = x - q[id];
    }
  }
  for (i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << "\n";
  return 0;
}
