Language: C++

#include<iostream>
#include<vector>
int main(){
  int N, K;
  cin >> N >> K;
  vector<int> d;
  vector<int> hito;
  for(int i = 0; i < K; i++){
    cin >> d[i];
    for(int j = 0; j < d[i]; j++){
      cin >> hito[j];
    }
  }
  vector<int> count(N);
  vector<vector<int>> data (K, vector<int>(d[i]));
  for(int i = 0; i < K; i++){
    for(int j = 0; j < d[i]; j++){
      for(int h = 1; h <= N; h++){
        if (data[i][j] == h){
          count[h]++;
        }
      }
    }
  }
  int ans = N;
  for(int h = 1; h <= N; h++){
    if(count[h] > 0){
      ans -= 1;
    }
  }
  
  cout << ans << endl;
}
      
      
      
    
  
    

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> N >> K;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> d;
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> d;
      |          ^~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> hito;
      |          ^~~
a.cc:9:12: error: 'd' was not declared in this scope
    9 |     cin >> d[i];
      |            ^
a.cc:11:14: error: 'hito' was not declared in this scope
   11 |       cin >> hito[j];
      |              ^~~~
a.cc:14:10: error: expected primary-expression before 'int'
   14 |   vector<int> count(N);
      |          ^~~
a.cc:15:17: error: expected primary-expression before 'int'
   15 |   vector<vector<int>> data (K, vector<int>(d[i]));
      |                 ^~~
a.cc:17:24: error: 'd' was not declared in this scope
   17 |     for(int j = 0; j < d[i]; j++){
      |                        ^
a.cc:19:13: error: 'data' was not declared in this scope; did you mean 'std::data'?
   19 |         if (data[i][j] == h){
      |             ^~~~
      |             std::data
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/range_access.h:344:5: note: 'std::data' declared here
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
a.cc:20:11: error: 'count' was not declared in this scope
   20 |           count[h]++;
      |           ^~~~~
a.cc:27:8: error: 'count' was not declared in this scope
   27 |     if(count[h] > 0){
      |        ^~~~~
a.cc:32:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   32 |   cout << ans << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:32:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   32 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~