#include <bits/stdc++.h>
using namespace std;
int n, m, a[200100], b[200100], c[200100];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(b + 1, b + n + 1);
  for (int i = 1; i <= m; i++) {
    int x, y;
    cin >> x >> y;
    if (a[x] > a[y])
      c[x]++;
    else if (a[y] > a[x])
      c[y]++;
  }
  for (int i = 1; i <= n; i++) {
    int j = lower_bound(b + 1, b + n + 1, a[i]) - b;
    j--;
    cout << j - c[i] << " ";
  }
  return 0;
}
