#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[200005];
int ans[200005];
int main() {
  int n, k, x, y;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  for (int i = 0; i < k; i++) {
    cin >> x >> y;
    if (a[x].first > a[y].first)
      ans[x]--;
    else if (a[y].first > a[x].first)
      ans[y]--;
  }
  sort(a + 1, a + 1 + n);
  int m = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i].first > a[i - 1].first) m = i - 1;
    ans[a[i].second] += m;
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
