#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " = " << a << "\n";
  err(++it, args...);
}
const long long MOD = 1e9 + 7, N = 1e3 + 5, inf = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  {
    int n, k;
    cin >> n >> k;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    ;
    multiset<int> s;
    for (int i = 0; i < n; i++) {
      s.insert(a[i]);
    }
    vector<int> v(n, 0), ans(n, 0);
    while (k--) {
      int x, y;
      cin >> x >> y;
      x--;
      y--;
      if (a[x] > a[y]) {
        v[x]--;
      } else if (a[x] < a[y]) {
        v[y]--;
      }
    }
    map<int, int> m;
    int cnt = 0, cf = 0, lst = -1;
    for (auto &x : s) {
      if (lst != x) {
        cnt++;
        cnt += cf;
        cf = 0;
      } else {
        cf++;
      }
      m[x] = cnt - 1;
      lst = x;
    }
    for (int i = 0; i < n; i++) {
      int val = m[a[i]];
      ans[i] = max(0, val + v[i]);
    }
    for (int i = 0; i < n; i++) cout << ans[i] << " ";
    cout << "\n";
    ;
  }
}
