#include <bits/stdc++.h>
using namespace std;
long long jwb[269696], a[269696];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m, x, y;
  vector<pair<long long, long long> > v;
  vector<long long> v1;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    v.push_back(make_pair(a[i], i));
  }
  for (int i = 1; i <= m; i++) {
    cin >> x >> y;
    if (a[x] > a[y])
      jwb[x]--;
    else if (a[y] > a[x])
      jwb[y]--;
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) {
    v1.push_back(v[i].first);
  }
  for (int i = 0; i < v.size(); i++) {
    long long low = lower_bound(v1.begin(), v1.end(), v1[i]) - v1.begin();
    jwb[v[i].second] += low;
  }
  for (int i = 1; i <= n; i++) {
    cout << jwb[i] << " ";
  }
}
