#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, i, j, c, b, sch = 0;
  vector<long long> l(200001), v(200001);
  vector<pair<long long, long long> > a, y;
  cin >> n >> k;
  for (i = 0; i < n; ++i) {
    cin >> c;
    v[i] = c;
    y.push_back({c, i});
  }
  for (i = 0; i < k; ++i) {
    cin >> c >> b;
    a.push_back({c, b});
  }
  sort(y.begin(), y.end());
  for (i = 1; i < n; ++i) {
    if (y[i - 1].first == y[i].first) {
      sch++;
    } else
      sch = 0;
    l[y[i].second] += i - sch;
  }
  for (i = 0; i < k; ++i) {
    if (v[a[i].first - 1] > v[a[i].second - 1]) {
      --l[a[i].first - 1];
    }
    if (v[a[i].first - 1] < v[a[i].second - 1]) {
      --l[a[i].second - 1];
    }
  }
  for (i = 0; i < n; ++i) {
    cout << l[i] << ' ';
  }
}
