#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
const int maxn = 2e5 + 10;
int a[maxn], s[maxn], ans[maxn];
int main()
{
int n, k;
cin >> n >> k;
for(int i = 1; i <= n; i++)
{
cin >> a[i];
s[i] = a[i];
}
sort(s+1, s+n+1);
for(int i = 1; i <= n; i++)
{
int p = lower_bound(s+1, s+n+1, a[i]) - s;
ans[i] = p - 1;
}
int x, y;
while(k--)
{
cin >> x >> y;
if(a[x] == a[y]) continue;
if(a[x] > a[y]) ans[x]--;
else ans[y]--;
}
for(int i = 1; i <= n; i++)
printf("%d%c", ans[i], i==n?'\n':' ');
return 0;
}