#include <bits/stdc++.h>
using namespace std;
template <typename T>
using V = vector<T>;
template <typename T>
using VV = vector<V<T>>;
template <typename T>
istream& operator>>(istream& cin, V<T>& arr) {
  for (T& val : arr) {
    cin >> val;
  }
  return cin;
}
template <typename T>
ostream& operator<<(ostream& cout, V<T>& arr) {
  for (T& val : arr) {
    cout << val << ' ';
  }
  return cout;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(10);
  long long n, k;
  cin >> n >> k;
  vector<vector<long long>> v(n, vector<long long>(2));
  for (long long i = 0; i < n; i++) {
    cin >> v[i][0];
    v[i][1] = i;
  }
  vector<long long> ans(n, 0);
  while (k--) {
    long long a, b;
    cin >> a >> b;
    a--;
    b--;
    if (v[a][0] > v[b][0])
      ans[a]--;
    else if (v[a][0] < v[b][0])
      ans[b]--;
  }
  sort(v.begin(), v.end());
  for (long long i = 0; i < n; i++) {
    long long l = -1;
    long long r = i - 1;
    while (l < r) {
      long long m = (l + r + 1) / 2;
      if (v[m][0] >= v[i][0])
        r = m - 1;
      else
        l = m;
    }
    ans[v[i][1]] += l + 1;
  }
  for (long long i : ans) cout << i << ' ';
  return 0;
}
