#include <bits/stdc++.h>
using namespace std;
int n, m, l, s, low, high, mide;
vector<long long> gana;
vector<long long> ans;
vector<pair<long long, long long>> orden;
long long cnt = 0;
int main() {
  cin >> n >> m;
  gana.resize(n);
  ans.assign(n + 1, 0);
  for (int i = 0; i < n; i++) {
    cin >> gana[i];
    orden.push_back({gana[i], i});
  }
  for (int i = 0; i < m; i++) {
    cin >> l >> s;
    if (gana[l - 1] > gana[s - 1]) ans[l - 1]--;
    if (gana[l - 1] < gana[s - 1]) ans[s - 1]--;
  }
  sort(orden.begin(), orden.end());
  for (int i = 0; i < n; i++) {
    low = 0;
    high = n - 1;
    while (low <= high) {
      mide = (low + high) / 2;
      if (orden[mide].first >= orden[i].first)
        high = mide - 1;
      else
        low = mide + 1;
    }
    ans[orden[i].second] += low;
  }
  for (int i = 0; i < n; i++) cout << ans[i] << "\n";
}
