#include <bits/stdc++.h>
using namespace std;
int ans[2 * 100000 + 20];
int skills[2 * 100000 + 20];
int tmp[2 * 100000 + 20];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> skills[i];
    tmp[i] = -skills[i];
  }
  for (int i = 0; i < k; i++) {
    int x, y;
    cin >> x >> y;
    if (skills[x] > skills[y]) ans[x]--;
    if (skills[y] > skills[x]) ans[y]--;
  }
  sort(tmp + 1, tmp + 1 + n);
  for (int i = 1; i <= n; i++) {
    int *it = upper_bound(tmp + 1, tmp + 1 + n, -skills[i]);
    ans[i] += tmp + 1 + n - it;
    cout << (ans[i] > 0 ? ans[i] : 0) << " ";
  }
  return 0;
}
