#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
long long inf = 1ll << 30;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  long long n, k;
  cin >> n >> k;
  long long x[n];
  vector<long long> node[n], v;
  for (long long &i : x) {
    cin >> i;
    v.push_back(i);
  }
  sort(v.begin(), v.end());
  map<long long, long long> cnt;
  long long pre = -1;
  for (long long i = 0; i < n; i++) {
    if (i > 0 and v[i] != v[i - 1]) pre = i - 1;
    cnt[v[i]] = pre + 1;
  }
  while (k--) {
    long long u, vv;
    cin >> u >> vv;
    u--, vv--;
    node[u].push_back(vv);
    node[vv].push_back(u);
  }
  for (long long i = 0; i < n; i++) {
    long long ans = cnt[x[i]];
    for (long long j : node[i])
      if (x[j] < x[i]) ans--;
    cout << ans << ' ';
  }
}
