Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;

static const int N = 1e+5;
vector<int> fr[N], bl[N];
bool visited[N];
int n, group[N], color = 0, conj[N];

void dfs(int s){
	rep(i, n){
		visited[i] = false;
		conj[i] = 0;
	}

    function<void(int)> rec = [&](int u){
        visited[u] = true;
        group[u] = color;
        conj[color]++;
        rep(i, fr[u].size()){
            if(visited[fr[u][i]]) continue;
            rec(fr[u][i]);
        }
        return;
    };

	rep(i, n){
		if(visited[i]) continue;
		rec(i);
		color++;
	}
	return;
}

int main(){
	int m, k, x, y;
	cin >> n >> m >> k;
	rep(i, m){
		cin >> x >> y;
		fr[x-1].push_back(y-1);
		fr[y-1].push_back(x-1);
	} rep(i, k){
		cin >> x >> y;
		bl[x-1].push_back(y-1);
		bl[y-1].push_back(x-1);
	}
	
	dfs(0);
	
	int cnt[n];
	rep(i, n){
		cnt[i] = 0;
		rep(j, bl[i].size()){
			if(group[i] != group[bl[i][j]]) cnt[i]++;
		}
	}
	rep(i, n){
		cout << conj[group[i]] - fr[i].size() 
			- bl[i].size() + cnt[i] - 1 << endl;
	}
	return 0;
}

Compiler output:
a.cc:8:29: warning: built-in function 'conj' declared as non-function [-Wbuiltin-declaration-mismatch]
    8 | int n, group[N], color = 0, conj[N];
      |                             ^~~~
a.cc: In function 'void dfs(int)':
a.cc:13:17: error: reference to 'conj' is ambiguous
   13 |                 conj[i] = 0;
      |                 ^~~~
In file included from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/usr/include/c++/14/complex:2601:5: note: candidates are: 'template<class _Tp> std::complex<typename __gnu_cxx::__promote<_Tp, std::__is_integer<_Tp>::__value>::__type> std::conj(_Tp)'
 2601 |     conj(_Tp __x)
      |     ^~~~
/usr/include/c++/14/complex:975:5: note:                 'template<class _Tp> std::complex<_Tp> std::conj(const complex<_Tp>&)'
  975 |     conj(const complex<_Tp>& __z)
      |     ^~~~
a.cc:8:29: note:                 'int conj [100000]'
    8 | int n, group[N], color = 0, conj[N];
      |                             ^~~~
a.cc: In lambda function:
a.cc:19:9: error: reference to 'conj' is ambiguous
   19 |         conj[color]++;
      |         ^~~~
/usr/include/c++/14/complex:2601:5: note: candidates are: 'template<class _Tp> std::complex<typename __gnu_cxx::__promote<_Tp, std::__is_integer<_Tp>::__value>::__type> std::conj(_Tp)'
 2601 |     conj(_Tp __x)
      |     ^~~~
/usr/include/c++/14/complex:975:5: note:                 'template<class _Tp> std::complex<_Tp> std::conj(const complex<_Tp>&)'
  975 |     conj(const complex<_Tp>& __z)
      |     ^~~~
a.cc:8:29: note:                 'int conj [100000]'
    8 | int n, group[N], color = 0, conj[N];
      |                             ^~~~
a.cc: In function 'int main()':
a.cc:58:25: error: reference to 'conj' is ambiguous
   58 |                 cout << conj[group[i]] - fr[i].size()
      |                         ^~~~
/usr/include/c++/14/complex:2601:5: note: candidates are: 'template<class _Tp> std::complex<typename __gnu_cxx::__promote<_Tp, std::__is_integer<_Tp>::__value>::__type> std::conj(_Tp)'
 2601 |     conj(_Tp __x)
      |     ^~~~
/usr/include/c++/14/complex:975:5: note:                 'template<class _Tp> std::complex<_Tp> std::conj(const complex<_Tp>&)'
  975 |     conj(const complex<_Tp>& __z)
      |     ^~~~
a.cc:8:29: note:                 'int conj [100000]'
    8 | int n, group[N], color = 0, conj[N];
      |                             ^~~~