Language: C++

#include <iostream>
#include <vector>

bool is_even_all(vector<int> a){
    int count = 0:
    for (int i=0;i<a.length();i++){
        if (a[i]%2==0) count++;
    }
    return (count == a.length())
}

void divide_two_all(vector<int> &a){
    for (int i=0;i<a.length();i++){
        a[i]/=2;
    }
}

int main(void){
    int n,count;
    vector<int> a;

    cin >> n;
    for (int i=0;i<n;i++){
        int v;
        cin >> a;
        a.push_back(v);
    }

    while ( is_even_all(a) ){
        count++;
        divide_two_all(a);
    }

    cout << count;
}

Compiler output:
a.cc:4:18: error: 'vector' was not declared in this scope
    4 | bool is_even_all(vector<int> a){
      |                  ^~~~~~
a.cc:4:18: 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:4:25: error: expected primary-expression before 'int'
    4 | bool is_even_all(vector<int> a){
      |                         ^~~
a.cc:12:6: error: variable or field 'divide_two_all' declared void
   12 | void divide_two_all(vector<int> &a){
      |      ^~~~~~~~~~~~~~
a.cc:12:21: error: 'vector' was not declared in this scope
   12 | void divide_two_all(vector<int> &a){
      |                     ^~~~~~
a.cc:12:21: note: suggested alternatives:
/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:12:28: error: expected primary-expression before 'int'
   12 | void divide_two_all(vector<int> &a){
      |                            ^~~
a.cc: In function 'int main()':
a.cc:20:5: error: 'vector' was not declared in this scope
   20 |     vector<int> a;
      |     ^~~~~~
a.cc:20:5: note: suggested alternatives:
/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:20:12: error: expected primary-expression before 'int'
   20 |     vector<int> a;
      |            ^~~
a.cc:22:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   22 |     cin >> n;
      |     ^~~
      |     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:25:16: error: 'a' was not declared in this scope
   25 |         cin >> a;
      |                ^
a.cc:29:25: error: 'a' was not declared in this scope
   29 |     while ( is_even_all(a) ){
      |                         ^
a.cc:29:26: error: 'is_even_all' cannot be used as a function
   29 |     while ( is_even_all(a) ){
      |                          ^
a.cc:31:9: error: 'divide_two_all' was not declared in this scope
   31 |         divide_two_all(a);
      |         ^~~~~~~~~~~~~~
a.cc:34:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   34 |     cout << count;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~