#include <bits/stdc++.h>
using namespace std;
const int maxx = 2 * (1e5 + 7);
int a[maxx], b[maxx], ans[maxx];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(b + 1, b + 1 + n);
  for (int i = 1; i <= n; i++)
    ans[i] = lower_bound(b + 1, b + 1 + n, a[i]) - b - 1;
  while (m--) {
    int c, d;
    cin >> c >> d;
    if (a[c] > a[d])
      ans[c]--;
    else if (a[c] < a[d])
      ans[d]--;
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
