#include <bits/stdc++.h>
using namespace std;
int n, k, ans[200003];
pair<long long, int> a[200003];
map<int, int> mp;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++)
    cin >> a[i].first, a[i].second = i, ans[i] -= mp[a[i].first],
                       mp[a[i].first]++;
  for (int i = 0; i < k; i++) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    if (a[x].first > a[y].first) ans[x]--;
    if (a[y].first > a[x].first) ans[y]--;
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) ans[a[i].second] += i;
  for (int i = 0; i < n; i++) cout << ans[i] << ' ';
}
