#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
vector<int> adj[200050];
long long arr[200050];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m;
  cin >> n >> m;
  vector<long long> p;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    p.push_back(arr[i]);
  }
  sort(p.begin(), p.end());
  while (m--) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    if (arr[a] > arr[b])
      adj[a].push_back(b);
    else if (arr[a] < arr[b])
      adj[b].push_back(a);
  }
  for (int i = 0; i < n; i++) {
    int index = lower_bound(p.begin(), p.end(), arr[i]) - p.begin();
    cout << index - (int)adj[i].size() << " ";
  }
  cout << endl;
  return 0;
}
