#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int a[N];
int b[N];
int c[N];
int main() {
  int n, k, l, r;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    b[i] = a[i];
  }
  for (int i = 0; i < k; i++) {
    scanf("%d%d", &l, &r);
    if (a[l - 1] < a[r - 1]) c[r - 1]++;
    if (a[r - 1] < a[l - 1]) c[l - 1]++;
  }
  sort(b, b + n);
  for (int i = 0; i < n; i++) {
    int ind = lower_bound(b, b + n, a[i]) - b;
    printf("%d ", ind - c[i]);
  }
}
