#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int n, k;
int r[maxn];
int id[maxn];
bool cmp(int a, int b) { return r[a] < r[b]; }
int low[maxn];
int qualow[maxn];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> r[i];
    id[i] = i;
  }
  for (int i = 1; i <= k; i++) {
    int a, b;
    cin >> a >> b;
    if (r[a] > r[b]) qualow[a]++;
    if (r[a] < r[b]) qualow[b]++;
  }
  sort(id + 1, id + 1 + n, cmp);
  for (int i = 2; i <= n; i++) {
    if (r[id[i]] > r[id[i - 1]])
      low[id[i]] = i - 1;
    else
      low[id[i]] = low[id[i - 1]];
  }
  cout << low[1] - qualow[1];
  for (int i = 2; i <= n; i++) cout << " " << low[i] - qualow[i];
  cout << endl;
  return 0;
}
