#include <bits/stdc++.h>
const int inf = INT_MAX;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 111;
using namespace std;
int n, k, ans[2 * maxn];
int a[2 * maxn], b[2 * maxn];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i], b[i] = a[i];
  for (int i = 1; i <= k; i++) {
    int x, y;
    cin >> x >> y;
    if (a[x] > a[y])
      ans[x]--;
    else if (a[x] < a[y])
      ans[y]--;
  }
  sort(b + 1, b + n + 1);
  b[0] = -inf;
  b[n + 1] = inf;
  for (int i = 1; i <= n; i++) {
    int x = lower_bound(b, b + n + 2, a[i]) - b;
    ans[i] += (x - 1);
  }
  for (int i = 1; i <= n; i++) {
    cout << max(0, ans[i]) << " ";
  }
}
