#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 50;
long long r[N], rs[N], n, m;
vector<int> adj[N];
int BS(int q) {
  int l = 0;
  int r = n + 1;
  while (r - l > 1) {
    int mid = (l + r) / 2;
    if (rs[mid] < q) {
      l = mid;
    } else {
      r = mid;
    }
  }
  return l;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> r[i];
    rs[i] = r[i];
  }
  sort(rs + 1, rs + n + 1);
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    if (r[u] > r[v]) adj[u].push_back(v);
    if (r[v] > r[u]) adj[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) {
    int ans = BS(r[i]);
    ans -= (int)adj[i].size();
    cout << ans << " ";
  }
}
