#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9;
const long long N = 2e5 + 3;
const long long mod = 1e9 + 7;
const long double eps = 1E-7;
long long n, k;
pair<int, int> a[N];
long long ans[N];
long long mp[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].first;
    a[i] = {a[i].first, i};
  }
  for (int i = 1; i <= k; i++) {
    long long x, y;
    cin >> x >> y;
    if (a[x].first > a[y].first)
      mp[x]--;
    else if (a[y].first > a[x].first)
      mp[y]--;
  }
  sort(a + 1, a + 1 + n);
  long long cnt = 0;
  for (int i = 2; i <= n; i++) {
    if (a[i].first != a[i - 1].first) {
      cnt = i - 1;
    }
    ans[a[i].second] = cnt;
  }
  for (int i = 1; i <= n; i++) {
    cout << max(0ll, ans[i] + mp[i]) << ' ';
  }
}
