#include <bits/stdc++.h>
using namespace std;
int n, i, j, k, p, x, y, ans[2 * 100007], b[2 * 100007];
bool bar[2 * 100007];
pair<int, int> a[2 * 100007];
vector<vector<int> > v(2 * 100007);
map<int, int> ok;
int main() {
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> a[i].first;
    b[i] = a[i].first;
    a[i].second = i;
  }
  sort(a + 1, a + n + 1);
  for (i = 1; i <= k; i++) {
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (i = 1; i <= n; i++) {
    bar[a[i].second] = 1;
    ok[a[i].first]++;
    ans[a[i].second] = i - ok[a[i].first];
    for (j = 0; j < v[a[i].second].size(); j++) {
      if (bar[v[a[i].second][j]] == 1 && b[v[a[i].second][j]] != a[i].first)
        ans[a[i].second]--;
    }
  }
  for (i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
}
