#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2e5 + 5;
vector<int> mp;
int a[MAX_N], ans[MAX_N];
int main() {
  int n, m, x, y;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    mp.push_back(a[i]);
  }
  sort(mp.begin(), mp.end());
  for (int i = 1; i <= n; i++) {
    ans[i] = lower_bound(mp.begin(), mp.end(), a[i]) - mp.begin();
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    if (a[x] > a[y]) ans[x]--;
    if (a[x] < a[y]) ans[y]--;
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
