#include <bits/stdc++.h>
using namespace std;
long long n, k, x, z, zz, y, a[200009], b[200009], s[200009];
map<long long, long long> mp;
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    s[i] = a[i];
  }
  for (int i = 0; i < k; i++) {
    cin >> x >> y;
    if (a[x] > a[y])
      b[x]++;
    else if (a[x] < a[y])
      b[y]++;
  }
  sort(s + 1, s + n + 1);
  for (int i = 1; i <= n; i++) {
    if (s[i] > z) {
      z = s[i];
      zz = 0;
    }
    mp[s[i]] = i - 1 - zz;
    if (s[i] == z) zz++;
  }
  for (int i = 1; i <= n; i++) cout << mp[a[i]] - b[i] << " ";
}
