Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <algorithm>

int main(){
  int a, b, c;
  cin >> a >> b >> c;
  int N = a + b + c;
  int minans = 10000;
  int ans = 10000;
  for(int i = 1; i <= 150; i++){
    int oddcounter = 0;
    if(i % 3 == 0 && N % 2 == i/3 % 2 && i / 3 >= max(a,max(b,c))){
      vector<int> d(3);
      d[0] = a - i/3;
      d[1] = b - i/3;
      d[2] = c - i/3;
      for(int j = 0; j < 3; j++){
        if(devidual % 2 == 1) oddcounter++;
      }
      if(oddcounter == 0){
        ans = d[0]/2 + d[1]/2 + d[2] /2;
      }else if(oddcounter == 1){
        continue;
      }else if(oddcounter == 2){
        ans = 1 + d[0] % 2 == 0 ? d[0] / 2 : (d[0] - 1) / 2 + d[1] % 2 == 0 ? d[1] / 2 : (d[1] - 1) / 2 + d[2] % 2 == 0 ? d[2] / 2 : (d[2] - 1) / 2;
      }else if(oddcounter == 3){
        continue;
      }
    }
    if(ans <= mixans) mixans = ans;
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> a >> b >> c;
      |   ^~~
      |   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:14:57: error: 'max' was not declared in this scope; did you mean 'std::max'?
   14 |     if(i % 3 == 0 && N % 2 == i/3 % 2 && i / 3 >= max(a,max(b,c))){
      |                                                         ^~~
      |                                                         std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:14:51: error: 'max' was not declared in this scope; did you mean 'std::max'?
   14 |     if(i % 3 == 0 && N % 2 == i/3 % 2 && i / 3 >= max(a,max(b,c))){
      |                                                   ^~~
      |                                                   std::max
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:15:7: error: 'vector' was not declared in this scope
   15 |       vector<int> d(3);
      |       ^~~~~~
a.cc:15:7: 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:15:14: error: expected primary-expression before 'int'
   15 |       vector<int> d(3);
      |              ^~~
a.cc:16:7: error: 'd' was not declared in this scope
   16 |       d[0] = a - i/3;
      |       ^
a.cc:20:12: error: 'devidual' was not declared in this scope
   20 |         if(devidual % 2 == 1) oddcounter++;
      |            ^~~~~~~~
a.cc:32:15: error: 'mixans' was not declared in this scope; did you mean 'minans'?
   32 |     if(ans <= mixans) mixans = ans;
      |               ^~~~~~
      |               minans
a.cc:34:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   34 |   cout << ans;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~