#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)1e18 + 7;
const int inf = (int)1e9 + 7;
const double eps = 1e-7;
const int sz = 300;
const double pi = 3.14159265359;
int n, k, x, y, res[200000];
pair<int, int> r[200000];
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &r[i].first);
    r[i].second = i;
  }
  for (int i = 0; i < k; ++i) {
    scanf("%d%d", &x, &y);
    --x;
    --y;
    if (r[x].first < r[y].first) --res[y];
    if (r[y].first < r[x].first) --res[x];
  }
  sort(r, r + n);
  reverse(r, r + n);
  int ind = 0;
  for (int i = 0; i < n; ++i) {
    while (ind < n && r[ind].first >= r[i].first) ++ind;
    res[r[i].second] += n - ind;
  }
  for (int i = 0; i < n; ++i) printf("%d ", res[i]);
  return 0;
}
