#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int OO = (int)1e6;
const int N = (int)2e7;
void init() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int power[N];
int power_sort[N];
map<int, pair<int, int>> mp;
vector<int> ans;
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  int p;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p);
    power[i] = p;
    power_sort[i] = p;
  }
  int x, y;
  ans = vector<int>(n + 1);
  sort(power_sort + 1, power_sort + n + 1);
  for (int i = 1; i <= n; i++) {
    auto it = lower_bound(power_sort + 1, power_sort + n + 1, power[i]) -
              power_sort - 1;
    ans[i] = it;
  }
  for (int i = 0; i < k; i++) {
    scanf("%d %d", &x, &y);
    if (power[x] < power[y])
      ans[y]--;
    else if (power[y] < power[x])
      ans[x]--;
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
