#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long MAX = 2e6 + 7;
const long long INF = 1e15;
const long long dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const long long dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
long long i, j, k, t, n, q, l, r, mid;
long long pos, x, y, m;
long long sk[MAX], val[MAX];
vector<long long> v;
void solve() {
  cin >> n >> m;
  for (long long i = 1; i < n + 1; i++) {
    cin >> sk[i];
    v.push_back(sk[i]);
  }
  sort(v.begin(), v.end());
  while (m--) {
    cin >> x >> y;
    if (sk[x] > sk[y]) {
      val[x]--;
    } else if (sk[y] > sk[x])
      val[y]--;
  }
  for (long long i = 1; i < n + 1; i++) {
    pos = lower_bound(v.begin(), v.end(), sk[i]) - v.begin();
    cout << pos + val[i] << " ";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  solve();
  return 0;
}
