#include <bits/stdc++.h>
using namespace std;
int lower_bound(vector<pair<int, int>>& worker, int x) {
  int l = 0;
  int r = worker.size();
  for (int i = 0; i < 100; ++i) {
    int m = (l + r) / 2;
    if (worker[m].first < x)
      l = m;
    else
      r = m;
  }
  return r;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  vector<pair<int, int>> worker(n);
  vector<int> man(n);
  for (int i = 0; i < n; ++i) {
    cin >> worker[i].first;
    man[i] = worker[i].first;
    worker[i].second = i;
  }
  vector<int> bad_rel(n);
  for (int i = 0; i < k; ++i) {
    int a, b;
    cin >> a >> b;
    --a, --b;
    if (man[b] > man[a]) bad_rel[b]++;
    if (man[a] > man[b]) bad_rel[a]++;
  }
  sort(worker.begin(), worker.end());
  vector<int> ans(n);
  for (int i = 0; i < n; ++i) {
    int r = lower_bound(worker, man[i]);
    ans[i] = r - bad_rel[i];
  }
  for (int i : ans) {
    cout << i << ' ';
  }
}
