#include <bits/stdc++.h>
std::map<int, int> rankn, rank;
std::vector<int> arg[200010];
int r[200010];
std::pair<int, int> sumrank[200010];
int main() {
  int n, k;
  std::cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    std::cin >> r[i];
    rankn[r[i]]++;
  }
  for (int i = 0; i < k; i++) {
    int x, y;
    std::cin >> x >> y;
    arg[x].push_back(y);
    arg[y].push_back(x);
  }
  int rankcnt = 1;
  for (auto i = rankn.begin(); i != rankn.end(); i++) {
    int first = i->first;
    int second = i->second;
    sumrank[rankcnt] =
        std::make_pair(first, sumrank[rankcnt - 1].second + second);
    rank[first] = rankcnt;
    rankcnt++;
  }
  for (int i = 1; i <= n; i++) {
    int ans = sumrank[rank[r[i]] - 1].second;
    for (int j : arg[i]) {
      if (r[j] < r[i]) {
        ans--;
      }
    }
    std::cout << ans << " ";
  }
  std::cout << std::endl;
  return 0;
}
