#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  vector<int> sorted_a = a;
  sort(sorted_a.begin(), sorted_a.end());
  vector<int> quarrel(n, 0);
  while (k--) {
    int u, v;
    cin >> u >> v;
    --u;
    --v;
    if (a[u] > a[v]) {
      quarrel[u]++;
    } else if (a[v] > a[u]) {
      quarrel[v]++;
    }
  }
  for (int i = 0; i < n; ++i) {
    int tot =
        lower_bound(sorted_a.begin(), sorted_a.end(), a[i]) - sorted_a.begin();
    cout << tot - quarrel[i] << ' ';
  }
  return 0;
}
