#include <bits/stdc++.h>   using namespace std;   vector<int> v[200010];   bool vis[200010];   int amid[200010];   int n, m;   int a[200010];   vector<int> vv;   vector<pair<int, int> > t;   void dfs(int node) {     vis[node] = 1;     t.push_back({a[node], node});     int sz = v[node].size();     for (int i = 0; i < sz; i++) {       int nx = v[node][i];       if (!vis[nx]) dfs(nx);     }   }   void cal() {     int d = 0;     bool yy = 1;     map<int, int> mm;     for (int i = 0; i < t.size(); i++) {       mm[t[i].first]++;     }     set<int> s;     for (int i = 0; i < t.size(); i++) {       int node = t[i].second, r = t[i].first;       if (!s.count(r)) d += mm[r];       s.insert(r);       amid[node] -= (d - mm[r]);     }   }   int main() {     cin >> n >> m;     for (int i = 1; i <= n; i++) {       cin >> a[i];       vv.push_back(a[i]);     }     sort(vv.begin(), vv.end());     for (int i = 1; i <= n; i++) {       amid[i] = lower_bound(vv.begin(), vv.end(), a[i]) - vv.begin();     }     for (int i = 0; i < m; i++) {       int x, y;       cin >> x >> y;       v[x].push_back(y);       v[y].push_back(x);     }     for (int i = 1; i <= n; i++) {       int sz = v[i].size();       int r = a[i];       for (int j = 0; j < sz; j++) {         int nx = v[i][j];         if (a[nx] < a[i]) amid[i]--;       }     }     for (int i = 1; i <= n; i++) {       cout << amid[i] <<    ;     }   }   