#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, k;
  cin >> n >> k;
  vector<long long int> v(n, 0);
  vector<pair<long long int, long long int>> vp;
  unordered_map<long long int, long long int> mp;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    vp.push_back(make_pair(v[i], i));
  }
  sort(vp.begin(), vp.end());
  vector<long long int> quarrel(n, 0);
  for (int i = 0; i < k; i++) {
    long long int temp1, temp2;
    cin >> temp1 >> temp2;
    temp1--;
    temp2--;
    if (v[temp1] > v[temp2]) {
      quarrel[temp1]++;
    } else if (v[temp1] < v[temp2]) {
      quarrel[temp2]++;
    }
  }
  vector<long long int> ans(n, 0);
  for (int i = 0; i < n; i++) {
    ans[vp[i].second] = i - mp[vp[i].first] - quarrel[vp[i].second];
    mp[vp[i].first]++;
  }
  for (auto i : ans) cout << i << " ";
  cout << endl;
  return 0;
}
