#include <bits/stdc++.h>
using namespace std;
vector<long long> v[200005];
long long n, k;
long long ans[200005];
pair<long long, long long> p[200005];
int main() {
  scanf("%lld", &n);
  scanf("%lld", &k);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &p[i].first);
    p[i].second = i;
  }
  for (int i = 0; i < k; i++) {
    long long x, y;
    scanf("%lld", &x);
    scanf("%lld", &y);
    if (p[x].first > p[y].first) v[x].push_back(y);
    if (p[y].first > p[x].first) v[y].push_back(x);
  }
  sort(p + 1, p + n + 1);
  int j = 1;
  long long cnt = 1;
  for (int i = 1; i <= n; i++) {
    if (i > 1) {
      if (p[i].first != p[i - 1].first) {
        j += cnt;
        cnt = 1;
      } else
        cnt++;
    }
    ans[p[i].second] = j - 1 - (v[p[i].second].size());
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
