#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<pair<int, int>> a(n);
  vector<int> b(n);
  vector<int> c(n);
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a[i] = {x, i};
  }
  while (k--) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    if (a[x].first > a[y].first) b[x]++;
    if (a[x].first < a[y].first) b[y]++;
  }
  sort(a.begin(), a.end());
  int l = 0;
  for (int i = 0; i < n; i++) {
    k = i;
    k -= l;
    k -= b[a[i].second];
    c[a[i].second] = k;
    if (i < n - 1) {
      if (a[i].first < a[i + 1].first)
        l = 0;
      else
        l++;
    }
  }
  for (auto it : c) cout << it << " ";
  return 0;
}
