#include <bits/stdc++.h>
using namespace std;
const int md = 100100;
int n, m, x, y;
int ans[200100];
int a[200100];
pair<int, int> ps[200100];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> ps[i].first;
    a[i] = ps[i].first;
    ps[i].second = i;
  }
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    if (a[x] < a[y])
      --ans[y];
    else if (a[y] < a[x])
      --ans[x];
  }
  sort(ps + 1, ps + n + 1);
  int k = 0;
  for (int i = 1; i <= n; i++) {
    int id = ps[i].second;
    int vl = ps[i].first;
    while (k + 1 <= n && ps[k + 1].first < vl) ++k;
    ans[id] += k;
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
