#include <bits/stdc++.h>
using namespace std;
int binarySearch(int *v, int left, int right, int target) {
  int mid = (left + right) / 2;
  while (left <= right) {
    if (v[mid] >= target) {
      right = mid - 1;
    } else {
      left = mid + 1;
    }
    mid = (left + right) / 2;
  }
  return right;
}
const int N = 2e5 + 5;
int r[N];
int sorted_r[N];
vector<pair<int, int>> p(N, make_pair(0, 0));
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  int temp;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &temp);
    r[i] = temp;
    sorted_r[i] = temp;
  }
  sort(sorted_r + 1, sorted_r + n + 1);
  vector<int> result(n + 1, 0);
  for (int i = 1; i <= k; i++) {
    scanf("%d %d", &p[i].first, &p[i].second);
  }
  for (int i = 1; i <= n; i++) {
    int index = binarySearch(sorted_r, 1, n, r[i]);
    result[i] = index;
  }
  for (int i = 1; i <= k; i++) {
    int firstI = p[i].first;
    int secondI = p[i].second;
    if (r[firstI] < r[secondI]) {
      result[secondI]--;
    } else if (r[firstI] > r[secondI]) {
      result[firstI]--;
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", result[i]);
  }
  return 0;
}
