Language: C++

#inlude<bits/stdc++.h>
using namespace std;
vector<int>par;
vector<int>num;
void init(int N) {
  for (int i = 0; i <= N; i ++) {
    par[i] = -1;
    num[i] = 1;
  }
}
int root(int v) {
  if (par[v] == v) return v;
  return par[v] = root(par[v]);
}
bool same(int a, int b) {
  return root(a) == root(b);
}
void unit(int a, int b) {
  a = root(a);
  b = root(b);
  if (num[a] < num[b]) swap(a, b);
  par[b] = a;
  num[a] += num[b];
}
int group_Size(int v) {
  v = root(v);
  return num[v];
}
int main () {
  int N, M, K;
  cin >> N >> M >> K;
  par.resize(N + 1);
  num.resize(N + 1);
  vector<vector<int>>fri(N + 1);
  vector<vector<int>>blo(N + 1);
  for (int i = 0; i < M; i ++) {
    int a, b;
    cin >> a >> b;
    fri[a].push_back(b);
    fri[b].push_back(a);
    if (!same(a, b)) unit(a, b);
  }
  for (int i = 0; i < K; i ++) {
    int a, b;
    cin >> a >> b;
    blo[a].push_back(b);
    blo[b].push_back(a);
  }
  for (int i = 1; i <= N; i ++) {
    int ans = group_Size(i) - (int)fri[i].size();
    for (int j = 0; j < (int)blo[i].size(); j ++) {
      if (same(i, blo[i][j])) ans --;
    }
    cout << ans << endl;
  }
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
    1 | #inlude<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc:3:1: error: 'vector' does not name a type
    3 | vector<int>par;
      | ^~~~~~
a.cc:4:1: error: 'vector' does not name a type
    4 | vector<int>num;
      | ^~~~~~
a.cc: In function 'void init(int)':
a.cc:7:5: error: 'par' was not declared in this scope
    7 |     par[i] = -1;
      |     ^~~
a.cc:8:5: error: 'num' was not declared in this scope; did you mean 'enum'?
    8 |     num[i] = 1;
      |     ^~~
      |     enum
a.cc: In function 'int root(int)':
a.cc:12:7: error: 'par' was not declared in this scope
   12 |   if (par[v] == v) return v;
      |       ^~~
a.cc:13:10: error: 'par' was not declared in this scope
   13 |   return par[v] = root(par[v]);
      |          ^~~
a.cc: In function 'void unit(int, int)':
a.cc:21:7: error: 'num' was not declared in this scope; did you mean 'enum'?
   21 |   if (num[a] < num[b]) swap(a, b);
      |       ^~~
      |       enum
a.cc:21:24: error: 'swap' was not declared in this scope
   21 |   if (num[a] < num[b]) swap(a, b);
      |                        ^~~~
a.cc:22:3: error: 'par' was not declared in this scope
   22 |   par[b] = a;
      |   ^~~
a.cc:23:3: error: 'num' was not declared in this scope; did you mean 'enum'?
   23 |   num[a] += num[b];
      |   ^~~
      |   enum
a.cc: In function 'int group_Size(int)':
a.cc:27:10: error: 'num' was not declared in this scope; did you mean 'enum'?
   27 |   return num[v];
      |          ^~~
      |          enum
a.cc: In function 'int main()':
a.cc:31:3: error: 'cin' was not declared in this scope
   31 |   cin >> N >> M >> K;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inlude<bits/stdc++.h>
a.cc:32:3: error: 'par' was not declared in this scope
   32 |   par.resize(N + 1);
      |   ^~~
a.cc:33:3: error: 'num' was not declared in this scope; did you mean 'enum'?
   33 |   num.resize(N + 1);
      |   ^~~
      |   enum
a.cc:34:3: error: 'vector' was not declared in this scope
   34 |   vector<vector<int>>fri(N + 1);
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #inlude<bits/stdc++.h>
a.cc:34:17: error: expected primary-expression before 'int'
   34 |   vector<vector<int>>fri(N + 1);
      |                 ^~~
a.cc:35:17: error: expected primary-expression before 'int'
   35 |   vector<vector<int>>blo(N + 1);
      |                 ^~~
a.cc:39:5: error: 'fri' was not declared in this scope
   39 |     fri[a].push_back(b);
      |     ^~~
a.cc:46:5: error: 'blo' was not declared in this scope
   46 |     blo[a].push_back(b);
      |     ^~~
a.cc:50:36: error: 'fri' was not declared in this scope
   50 |     int ans = group_Size(i) - (int)fri[i].size();
      |                                    ^~~
a.cc:51:30: error: 'blo' was not declared in this scope
   51 |     for (int j = 0; j < (int)blo[i].size(); j ++) {
      |                              ^~~
a.cc:54:5: error: 'cout' was not declared in this scope
   54 |     cout << ans << endl;
      |     ^~~~
a.cc:54:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:54:20: error: 'endl' was not declared in this scope
   54 |     cout << ans << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inlude<bits/stdc++.h>