#include <bits/stdc++.h>
using namespace std;
const long long inff = 0x3f3f3f3f3f3f3f3f;
int n, k, s[200008], b[200008];
pair<int, int> a[200008];
map<int, int> mq;
int main() {
  cin.tie(0);
  scanf("%d", &n), scanf("%d", &k);
  for (int i(1); i <= (n); ++i)
    scanf("%d", &a[i].first), a[i].second = i, mq[a[i].first]++;
  int x, y;
  while (k--) {
    scanf("%d", &x), scanf("%d", &y);
    if (a[x].first != a[y].first) {
      if (a[x].first > a[y].first)
        b[x]--;
      else
        b[y]--;
    }
  }
  sort(a + 1, a + n + 1);
  int z = 0, l, qw, qwe, zz, zzz = 0;
  for (int i(1); i <= (n); ++i) {
    if (mq[a[i].first] > 1)
      zzz++;
    else
      zzz = 1;
    b[a[i].second] += z - zzz + 1;
    z++;
    if (zzz == mq[a[i].first]) zzz = 0;
  }
  for (int i(1); i <= (n); ++i) cout << b[i] << " ";
  cout << endl;
  return 0;
}
