#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n, k;
  cin >> n >> k;
  vector<pair<int, int>> nums(n);
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    nums[i] = {x, i};
  }
  vector<int> ans(n);
  for (int i = 0; i < k; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    if (nums[a].first > nums[b].first) {
      ans[a]--;
    } else if (nums[b].first > nums[a].first) {
      ans[b]--;
    }
  }
  sort(nums.begin(), nums.end());
  int start = 0;
  for (int i = 0; i < n; i++) {
    if (i != 0 && nums[i].first == nums[i - 1].first) {
      ans[nums[i].second] += start;
    } else {
      ans[nums[i].second] += i;
      start = i;
    }
  }
  for (int x : ans) cout << x << " ";
  cout << endl;
  return 0;
}
