#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
const long long MOD = 1e9 + 7;
long long n_bits(long long n) {
  long long x = __builtin_popcount(n);
  return x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    int n, m;
    cin >> n >> m;
    int a[n + 2], b[n + 2];
    for (long long i = 1; i <= (n); ++i) {
      cin >> a[i];
      b[i] = a[i];
    }
    unordered_map<int, int> make_pair;
    int x, y;
    while (m--) {
      cin >> x >> y;
      if (a[x] < a[y]) {
        make_pair[y]++;
      }
      if (a[x] > a[y]) {
        make_pair[x]++;
      }
    }
    int low;
    sort(b + 1, b + 1 + n);
    for (int i = 1; i <= n; i++) {
      low = lower_bound(b + 1, b + n + 1, a[i]) - b - 1;
      cout << (low - make_pair[i]) << " ";
    }
  }
  return 0;
}
