#include <bits/stdc++.h>
using namespace std;
int N;
pair<int, int> arr[200005];
int ans[200005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int M;
  cin >> N >> M;
  for (int i = 1; i <= N; i++) cin >> arr[i].first, arr[i].second = i;
  sort(arr + 1, arr + 1 + N);
  for (int i = 1; i <= N; i++) {
    int idx =
        lower_bound(arr + 1, arr + 1 + N, pair<int, int>{arr[i].first, 0}) -
        arr;
    ans[arr[i].second] = idx - 1;
  }
  sort(arr + 1, arr + 1 + N, [=](pair<int, int> a, pair<int, int> b) -> bool {
    return a.second < b.second;
  });
  for (int i = 0, u, v; i < M; i++) {
    cin >> u >> v;
    if (arr[u].first > arr[v].first) ans[u]--;
    if (arr[v].first > arr[u].first) ans[v]--;
  }
  for (int i = 1; i <= N; i++) {
    if (i != 1) cout << " ";
    cout << ans[i];
  }
  cout << endl;
  return 0;
}
