#include <bits/stdc++.h>
using namespace std;
long long r[200005][2];
pair<long long, long long> rr[200005];
int main() {
  long long n, k, x, y;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &r[i][0]);
    rr[i].first = r[i][0];
    rr[i].second = i;
  }
  sort(rr + 1, rr + n + 1,
       [](pair<long long, long long>& a, pair<long long, long long>& b) {
         return a.first < b.first;
       });
  long long pre = 0;
  for (int i = 2; i <= n; i++) {
    if (rr[i].first > rr[i - 1].first) pre = i - 1;
    r[rr[i].second][1] = pre;
  }
  for (int i = 0; i < k; i++) {
    scanf("%I64d%I64d", &x, &y);
    if (r[x][0] > r[y][0]) r[x][1]--;
    if (r[x][0] < r[y][0]) r[y][1]--;
  }
  for (int i = 1; i <= n; i++) printf("%d ", r[i][1]);
  printf("\n");
  return 0;
}
