#include <bits/stdc++.h>
using namespace std;
const int mn = 10e5 * 2 + 123;
int n, m, w, x, k, y;
int a[mn], ans = 0, sum = 0;
vector<int> v(mn);
int cnt[mn];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    v[i - 1] = a[i];
  }
  sort(v.begin(), v.begin() + n);
  while (k--) {
    cin >> x >> y;
    if (a[x] > a[y]) {
      cnt[x]++;
    }
    if (a[y] > a[x]) cnt[y]++;
  }
  for (int i = 1; i <= n; i++) {
    std::vector<int>::iterator low;
    low = std::lower_bound(v.begin(), v.begin() + n, a[i]);
    cout << (low - v.begin()) - cnt[i] << " ";
  }
}
