#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> P[200005];
long long res[200005], N[200005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, k, a, b, c, x, sum = 0, tempSum = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> N[i];
    P[i].first = N[i];
    P[i].second = i;
  }
  sort(P, P + n);
  for (int i = 1; i < n; i++) {
    tempSum++;
    if (P[i].first != P[i - 1].first) {
      sum += tempSum;
      tempSum = 0;
    }
    res[P[i].second] = sum;
  }
  while (k--) {
    cin >> a >> b;
    a--;
    b--;
    if (N[a] > N[b]) {
      res[a]--;
    } else if (N[a] < N[b]) {
      res[b]--;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << res[i] << " \n"[i == n - 1];
  }
  return 0;
}
