#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200 * 1000 + 23;
int n, k, a[MAXN], r[MAXN], c[MAXN];
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> r[i], a[i] = r[i];
  for (int i = 0; i < k; i++) {
    int u, v;
    cin >> u >> v;
    if (r[--u] < r[--v]) c[v]++;
    if (r[v] < r[u]) c[u]++;
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++)
    cout << (lower_bound(a, a + n, r[i]) - a) - c[i] << ' ';
  return 0;
}
