#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int a[N], b[N], c[N], bb[N];
int cnt, ans[N];
int n, m;
vector<int> v[N];
inline bool cmp(const int &x, const int &y) { return a[x] < a[y]; }
inline void update(int x) {
  for (; x <= n; x += x & -x) ++c[x];
}
inline int query(int x) {
  int ret = 0;
  for (; x; x -= x & -x) ret += c[x];
  return ret;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i(1); i <= (n); ++i) scanf("%d", a + i), bb[i] = a[i];
  sort(bb + 1, bb + n + 1);
  cnt = unique(bb + 1, bb + n + 1) - bb - 1;
  for (int i(1); i <= (n); ++i)
    a[i] = lower_bound(bb + 1, bb + cnt + 1, a[i]) - bb;
  for (int i(1); i <= (n); ++i) b[i] = i;
  sort(b + 1, b + n + 1, cmp);
  for (int i(1); i <= (n); ++i) {
    ans[b[i]] = query(a[b[i]] - 1);
    update(a[b[i]]);
  }
  for (int i(1); i <= (m); ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (int i(1); i <= (n); ++i) {
    for (auto u : v[i])
      if (a[u] < a[i]) --ans[i];
  }
  for (int i(1); i <= (n); ++i) printf("%d ", ans[i]);
  putchar(10);
  return 0;
}
