#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n, k;
  cin >> n >> k;
  vector<pair<long long int, long long int> > arr(n);
  for (int i = 0; i < n; ++i) {
    cin >> arr[i].first;
    arr[i].second = i;
  }
  vector<long long int> ans(n, 0);
  for (int i = 0; i < k; ++i) {
    long long int x, y;
    cin >> x >> y;
    x--;
    y--;
    if (arr[x].first < arr[y].first)
      ans[y]--;
    else if (arr[x].first > arr[y].first)
      ans[x]--;
  }
  sort((arr).begin(), (arr).end());
  for (int i = 0; i < n; ++i) {
    int temp = i;
    while (i < n && arr[i].first == arr[temp].first) {
      ans[arr[i].second] += temp;
      i++;
    }
    i--;
  }
  for (int i = 0; i < n; ++i) {
    cout << ans[i] << " ";
  }
  cout << "\n";
  return 0;
}
