#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353, oo = 1e18;
int n, k;
string s;
int a[200001];
int ans[200001];
pair<int, int> bkup[200001];
void solve() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    bkup[i] = make_pair(a[i], i);
  }
  int x, y;
  while (k--) {
    cin >> x >> y;
    if (a[x] > a[y]) ans[x]--;
    if (a[x] < a[y]) ans[y]--;
  }
  sort(bkup + 1, bkup + n + 1);
  int res = 0;
  bkup[0] = make_pair(a[1], 1);
  for (int i = 1; i <= n; i++) {
    ans[bkup[i].second] += res;
    if (i < n and bkup[i].first != bkup[i + 1].first) res = i;
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie();
  int t = 1;
  while (t--) solve();
}
