criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
#include<vector>
using namespace std;
typedef long long li;
#define rep(i,n) for(int i=0;i<(n);i++)
#define df 0
template<class T> void print(const T& t){ cout << t << "\n"; }
template<class T, class... Ts> void print(const T& t, const Ts&... ts) { cout << t; if (sizeof...(ts)) cout << " "; print(ts...); }

int main(){
  li v[7];
  rep(i,7) cin >> v[i];
  if(df)print(v[0]+v[1]+v[3]+v[4]);
  li s=v[1];
  if(v[0] && v[3] && v[4]){
    int f=(v[0]&1)+(v[3]&1)+(v[4]&1);
    if(f>=2){
      s+=3; v[0]--; v[3]--; v[4]--;      
    }
  }
  s+=v[0]/2*2;
  s+=v[3]/2*2;
  s+=v[4]/2*2;
  print(s);
}
#define df 0
#include<iostream>
#include<vector>
using namespace std;
typedef long long li;
#define rep(i,n) for(int i=0;i<(n);i++)
#define df 0
template<class T> void print(const T& t){ cout << t << "\n"; }
template<class T, class... Ts> void print(const T& t, const Ts&... ts) { cout << t; if (sizeof...(ts)) cout << " "; print(ts...); }

int main(){
  li v[7];
  rep(i,7) cin >> v[i];
  if(df)print(v[0]+v[1]+v[3]+v[4]);
  li s=v[1];
  if(v[0] && v[3] && v[4]){
    int f=(v[0]&1)+(v[3]&1)+(v[4]&1);
    if(f>=2){
      s+=3; v[0]--; v[3]--; v[4]--;      
    }
  }
  s+=v[0]/2*2;
  s+=v[3]/2*2;
  s+=v[4]/2*2;
  print(s);
}


Compiler output:
a.cc:33:24: error: redefinition of 'template<class T> void print(const T&)'
   33 | template<class T> void print(const T& t){ cout << t << "\n"; }
      |                        ^~~~~
a.cc:7:24: note: 'template<class T> void print(const T&)' previously declared here
    7 | template<class T> void print(const T& t){ cout << t << "\n"; }
      |                        ^~~~~
a.cc:34:37: error: redefinition of 'template<class T, class ... Ts> void print(const T&, const Ts& ...)'
   34 | template<class T, class... Ts> void print(const T& t, const Ts&... ts) { cout << t; if (sizeof...(ts)) cout << " "; print(ts...); }
      |                                     ^~~~~
a.cc:8:37: note: 'template<class T, class ... Ts> void print(const T&, const Ts& ...)' previously declared here
    8 | template<class T, class... Ts> void print(const T& t, const Ts&... ts) { cout << t; if (sizeof...(ts)) cout << " "; print(ts...); }
      |                                     ^~~~~
a.cc:36:5: error: redefinition of 'int main()'
   36 | int main(){
      |     ^~~~
a.cc:10:5: note: 'int main()' previously defined here
   10 | int main(){
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(),(v).end()
using ll = long long;
using P = pair<int, int>;
const int INF = 1e9;
const long long LINF = 1e18;
const long long MOD = 1e9 + 7;

signed main(){
    ll i, o, t, j, l, s, z;
    cin >> i >> o >> t >> j >> l >> s >> z;
    int cnt = 0;
    if (i % 2 == 1) cnt++;
    if (j % 2 == 1) cnt++;
    if (l % 2 == 1) cnt++;
    if(cnt <= 1){
        cout << o + 2 * (i / 2) + 2 * (j / 2) + 2 * (l / 2) << endl;
    }else{
        ll t = min(i, j, l);
        i -= t;
        j -= t;
        l -= t;
        cout << o + t * 3 + 2 * (i / 2) + 2 * (j / 2) + 2 * (l / 2) << endl;
    }
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:21:19:   required from here
   21 |         ll t = min(i, j, l);
      |                ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

//Zory-2020
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
// typedef __int128 ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define FR first
#define SE second
#define MP make_pair
#define PB push_back
#define vc vector
#define db double
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
#define bin(x) (1ll<<(x))
#define fo(i,l,r) for(int i=(l),I=(r);i<=I;i++)
#define fd(i,r,l) for(int i=(r),I=(l);i>=I;i--)
#define mem(x,val) memset(x,val,sizeof x)
#define Swap(a,b,n) for(int I=0;I<=n;I++) swap(a[I],b[I])
#define PC __builtin_popcountll
#ifdef DEBUG
#define DD 1
#else
#define DD 0
#endif
#define Debug if(DD) printf("line %d\n",__LINE__)
#define deb(x) if(DD) cerr<<#x<<'='<<x<<endl
#define debug if(DD) printf
namespace mine
{
	ll qread()
	{
		ll ans=0,f=1;char c=getchar();
		while(c<'0' or c>'9') {if(c=='-')f=-1;c=getchar();}
		while('0'<=c and c<='9') ans=ans*10+c-'0',c=getchar();
		return ans*f;
	}
	void write(ll num){if(num<0) putchar('-'),num=-num;if(num>=10) write(num/10);putchar('0'+num%10);}
	void write1(ll num){write(num);putchar(' ');}
	void write2(ll num){write(num);putchar('\n');}
	template<typename T>inline bool chmax(T&a,const T&b){return a<b?a=b,1:0;}
	template<typename T>inline bool chmin(T&a,const T&b){return a>b?a=b,1:0;}
	ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
	bool IN(ll x,ll l,ll r){return l<=x and x<=r;}
	void gg1(){write2(-1);exit(0);}
	void gg2(){puts("NO");exit(0);}
	
	const db eps=1e-8;
	const int INF=0x3f3f3f3f;
	const int MOD=1e9+7;
	int mm(const int x){return x>=MOD?x-MOD:x;}
	template<typename T> void add(T &x,const int &y){x=(x+y>=MOD?x+y-MOD:x+y);}
	ll qpower(ll x,ll e,int mod=MOD){ll ans=1;while(e){if(e&1)ans=ans*x%mod;x=x*x%mod;e>>=1;}return ans;}
	ll invm(ll x){return qpower(x,MOD-2);}
	const int M=5e6+10;
	ll fac[M],facinv[M],Inv[M];ll C(int n,int m){return n<0 or n<m?0:fac[n]*facinv[m]%MOD*facinv[n-m]%MOD;}
	void PRE()
	{
		fac[0]=1;fo(i,1,M-1) fac[i]=fac[i-1]*i%MOD;
		facinv[M-1]=invm(fac[M-1]);fd(i,M-1,1) facinv[i-1]=facinv[i]*i%MOD;
		Inv[1]=1;fo(i,2,M-1) Inv[i]=(MOD-MOD/i)*Inv[MOD%i]%MOD;
	}
	const int N=3e3+10;
	//------------------FIXED------------------
	
	void main()
	{
		ll I=qread(),O=qread(),T=qread(),J=qread(),L=qread();
		write((I/2)*2+O+(J/2)*2+(L/2)*2+(I&1 and J&1 and L&1)+(I%2==0 and I>0 and j&1 and L&1)+(I&1 and J%2==0 and J>0 and L&1)+(I&1 and J&1 and L%2==0 and L>0));
	}
};//变量重名！
signed main()
{
	#ifdef DEBUG
	//freopen("a.in","r",stdin);
	freopen("z.txt","r",stdin);
	//freopen("a.out","w",stdout);
	#endif
	srand(time(0));
	mine::PRE();//线性预处理模意义
	mine::main();
	if(DD) cerr<<"\n---------------------Zory---------------------\nTime: " <<1.0*clock()/CLOCKS_PER_SEC<<"s";
}

Compiler output:
a.cc: In function 'void mine::main()':
a.cc:70:91: error: 'j' was not declared in this scope
   70 |                 write((I/2)*2+O+(J/2)*2+(L/2)*2+(I&1 and J&1 and L&1)+(I%2==0 and I>0 and j&1 and L&1)+(I&1 and J%2==0 and J>0 and L&1)+(I&1 and J&1 and L%2==0 and L>0));
      |                                                                                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long  ll;
#define FOR(i,a,n) for(ll i=(ll)a;i<(ll)n;i++)
#define RFOR(i,a,n) for(ll i=(ll)n-1;i >= (ll)a;i--)
#define rep(i,n) FOR(i,0,n)
#define rrep(i,n) RFOR(i,0,n)
#define ALL(v) v.begin(), v.end()
#define bra(first,second) '(' << first << ',' << second << ')'
#define P(a,b) make_pair(a,b);
ll MOD = 1000000007;
//ll INF = 21474836470000000;
ll INF = 1001001001001001001;
long double EPS = 1e-11;
long double PI = 3.141592653589793238;
template<typename T>
void remove(std::vector<T>& vector, unsigned int index){
    vector.erase(vector.begin() + index);
}

using Graph = vector<vector<pair<ll,ll>>>;

ll A[10];

int main(){
    rep(i,7) cin >> A[i];
    ll I = A[0],L = A[3],J = A[4],ans = I + L + J;
    if(J > L) swap(J,L);
    if(I % 2 == 1){
        if(L % 2 == 1 && J % 2 == 1) ans = I + L + J;
        if(L % 2 == 0 && J % 2 == 0) ans--;
        if((L % 2) ^ (J % 2) == 1){
            if(L == 0 || J == 0) ans -= 2;
            else ans--;
    }else{
        if(I == 0){
            if(L % 2 == 1 && J % 2 == 1) ans -= 2;
            if(L % 2 == 0 && J % 2 == 0) ans = I + L + J;
            if((L % 2) ^ (J % 2) == 1) ans--;
        }else{
            if(L % 2 == 1 && J % 2 == 1) ans--;
            if(L % 2 == 0 && J % 2 == 0) ans = I + L + J;
            if((L % 2) ^ (J % 2) == 1) ans--;
        }
    }
    cout << ans + A[1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:2: error: expected '}' at end of input
   47 | }
      |  ^
a.cc:25:11: note: to match this '{'
   25 | int main(){
      |           ^
Language: C++

/**
 *    author:  otera    
**/
#include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>
using namespace std;

//#define int long long
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef long double ld;
const int inf=1e9+7;
const ll INF=1LL<<60 ;
const ll mod=1e9+7 ;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<int, int> P;
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back
#define debug(x)  cerr << #x << " = " << (x) << endl;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

void solve() {
	vector<int> a(7);
    rep(i, 7) {
        cin >> a[i];
    }
    if(a[0] == 0) {
        cout << a[1] + 2 * aj << endl;
        return;
    }
    if(aj == 0) {
        cout << a[1] + 2 * (a[0] / 2) << endl;
        return;
    }
    cout << a[1] + max(2 * (a[0] / 2) + 2 * (a[3] / 2) + 2 * (a[4] / 2), 3 + 2 * ((a[0] - 1) / 2)+ 2 * ((a[3] - 1) / 2) + 2 * ((a[4] - 1) / 2)) << endl;
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(10);
	//int t; cin >> t; rep(i, t)solve();
	solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:61:28: error: 'aj' was not declared in this scope; did you mean 'a'?
   61 |         cout << a[1] + 2 * aj << endl;
      |                            ^~
      |                            a
a.cc:64:8: error: 'aj' was not declared in this scope; did you mean 'a'?
   64 |     if(aj == 0) {
      |        ^~
      |        a
Language: C++

#include<bits/stdc++.h>
using namespace std;

int f(int x) {
  if (x % 2) return x - 1;
  return x;
}

int main() {
  int I, O, J, L;
  {
    int x; cin >> I >> O >> x >> J >> L;
  }
  long r = 0;
  if (I && J && L) {
    r = 3ll + f(I-1) + f(J-1) + f(L-1);
  }
  r = max(r, f(I) + f(J) + f(L));
  cout << r + O << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: no matching function for call to 'max(long int&, int)'
   18 |   r = max(r, f(I) + f(J) + f(L));
      |       ~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:18:10: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
   18 |   r = max(r, f(I) + f(J) + f(L));
      |       ~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:18:10: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   18 |   r = max(r, f(I) + f(J) + f(L));
      |       ~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef set<int> si;
typedef pair<int,int> pii;
#define rep(i,a,b) for(int i=(a); i<(b); ++i)
#define per(i,a,b) for(int i=(b)-1; i>=(a); --i)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define F first
#define S second

const int N = 7;

int main(void) {
	ios_base::sync_with_stdio(false); cin.tie(0);
	//freopen("in.txt", "r", stdin);
	vl a(N);
	rep(i,0,sz(a)) {
		cin >> a[i];
	}
	ll ret = a[1];
	ll x = min(a[0], min(a[3],a[4]));
	ll y = a[0]%2 + a[3]%2 + a[4]%2;
	if(y >= 2) {
		x = min(1, x);
	} else {
		x = 0;
	}
	rep(i,0,x+1) {
		ll loc = a[1] + 3 * i;
		loc += ((a[0]-i)/2)*2;
		loc += ((a[3]-i)/2)*2;
		loc += ((a[4]-i)/2)*2;
		ret = max(ret, loc);
	}
	cout << ret << '\n';
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:24: error: no matching function for call to 'min(int, ll&)'
   30 |                 x = min(1, x);
      |                     ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:30:24: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   30 |                 x = min(1, x);
      |                     ~~~^~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:30:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   30 |                 x = min(1, x);
      |                     ~~~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int,  int>;
using pll = pair<ll, ll>;
using edge = pair<int, ll>;
using graph = vector<vector<int>>; 
using WeightedGraph = vector<vector<edge>>;
const ll INF = 1LL << 60;
const int INF32 = 1 << 29;
const ll MOD = 1000000007;

int main() {
  ll i,o,t,j,l,s,z;
  cin >>i>> o>> t>> j>> l>> s>> z;
  ll ans =o;
  if(i%2+j%2+l%2>1){}
    ll tmp = min(1, min(i, min(j, l)));
    ans+=3*tmp;
    i-=tmp;j-=tmp;l-=tmp;
  }
  ans+=(i/2)* 2;
  ans+=(j/2)* 2;
  ans+=(l/2)* 2;
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: no matching function for call to 'min(int, const long long int&)'
   19 |     ll tmp = min(1, min(i, min(j, l)));
      |              ~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:19:17: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   19 |     ll tmp = min(1, min(i, min(j, l)));
      |              ~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:19:17: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   19 |     ll tmp = min(1, min(i, min(j, l)));
      |              ~~~^~~~~~~~~~~~~~~~~~~~~~
a.cc: At global scope:
a.cc:23:3: error: 'ans' does not name a type
   23 |   ans+=(i/2)* 2;
      |   ^~~
a.cc:24:3: error: 'ans' does not name a type
   24 |   ans+=(j/2)* 2;
      |   ^~~
a.cc:25:3: error: 'ans' does not name a type
   25 |   ans+=(l/2)* 2;
      |   ^~~
a.cc:26:3: error: 'cout' does not name a type
   26 |   cout << ans << endl;
      |   ^~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;
typedef long double lb;
typedef pair<int,int> P;
const int MOD = 1000000007;
const ll INF = 1e10;
const double EPS = 1e-10;
const double PI = 3.141592653589793;
template<class T> inline bool chmin(T& a, T b){if(a>b){a = b;return 1;}return 0;}
template<class T> inline bool chmax(T& a, T b){if(a<b){a = b;return 1;}return 0;}
const pair<int,int> fd[] = {make_pair(1,0),make_pair(-1,0),make_pair(0,1),make_pair(0,-1)}; 
#define int long long
#define double long double



////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////i

int a[10], ans;
signed main(){
  rep(i,7)cin>>a[i];
  ans += (a[0]/2)*2;a[0] %= 2;
  ans += a[1];a[1] = 0;
  if(a[0]){
    if(a[3] % 2 == 0 && a[4] % 2 == 0){
    ans += (a[3]/2)*2;a[3] %= 2;
    ans += (a[4]/2)*2;a[4] %= 2;  
    }else if(a[3] % 2 && a[4] % 2){
      ans += (a[3]/2)*2;a[3] %= 2;
      ans += (a[4]/2)*2;a[4] %= 2;
      ans += 3;
    }else{
      ans += 3;a--;b--;
      ans += (a[3]/2)*2;a[3] %= 2;
      ans += (a[4]/2)*2;a[4] %= 2;
    }
  }else{
    ans += (a[3]/2)*2;a[3] %= 2;
    ans += (a[4]/2)*2;a[4] %= 2;
  }


  cout << ans << endl;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:39:16: error: lvalue required as decrement operand
   39 |       ans += 3;a--;b--;
      |                ^
a.cc:39:20: error: 'b' was not declared in this scope; did you mean 'lb'?
   39 |       ans += 3;a--;b--;
      |                    ^
      |                    lb
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
	ll aI, aO, aT, aJ, aL, aS, aZ;
	cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ;
	if(aI%2 == aJ%2 && aJ%2 == aL%2){ cout << aI + aJ + aL + aO << endl; }
	else{
		if((aI + aJ + aL) % 2 == 0 && min(min(aI, aJ), aL) == 0){
			cout << aI + aJ + aL + aO - 2 << endl;
		}else{ cout << max(0, aI + aJ + aL + aO - 1) << endl; }
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:35: error: no matching function for call to 'max(int, ll)'
   12 |                 }else{ cout << max(0, aI + aJ + aL + aO - 1) << endl; }
      |                                ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:12:35: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   12 |                 }else{ cout << max(0, aI + aJ + aL + aO - 1) << endl; }
      |                                ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:12:35: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   12 |                 }else{ cout << max(0, aI + aJ + aL + aO - 1) << endl; }
      |                                ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
	ll aI, aO, aT, aJ, aL, aS, aZ;
	cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ;
	if(aI%2 == aJ%2 && aJ%2 == aL%2){ cout << aI + aJ + aL + aO << endl; }
	else{
		if((aI + aJ + aL) % 2 == 0 && min(min(aI, aJ), aL) == 0){
			cout << aI + aJ + aL + aO - 2 << endl;
		}else{ cout << max(0, aI + aJ + aL + aO - 1) << endl; }
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'll' was not declared in this scope
    5 |         ll aI, aO, aT, aJ, aL, aS, aZ;
      |         ^~
a.cc:6:16: error: 'aI' was not declared in this scope
    6 |         cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ;
      |                ^~
a.cc:6:22: error: 'aO' was not declared in this scope
    6 |         cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ;
      |                      ^~
a.cc:6:28: error: 'aT' was not declared in this scope
    6 |         cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ;
      |                            ^~
a.cc:6:34: error: 'aJ' was not declared in this scope
    6 |         cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ;
      |                                  ^~
a.cc:6:40: error: 'aL' was not declared in this scope
    6 |         cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ;
      |                                        ^~
a.cc:6:46: error: 'aS' was not declared in this scope
    6 |         cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ;
      |                                              ^~
a.cc:6:52: error: 'aZ' was not declared in this scope
    6 |         cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ;
      |                                                    ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
	int aI, aO, aT, aJ, aL, aS, aZ;
	cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ;
	if(aI%2 == aJ%2 && aJ%2 == aL%2) cout << aI + aJ + aL + aO << endl;
	else{
		if((aI + aJ + aL) % 2 == 0 && min(min(aI, aJ), aL) == 0)
			cout << aI + aJ + aL + aO - 2 << endl;
		}else cout << max(0, aI + aJ + aL + aO - 1) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: 'else' without a previous 'if'
   11 |                 }else cout << max(0, aI + aJ + aL + aO - 1) << endl;
      |                  ^~~~
a.cc: At global scope:
a.cc:13:9: error: expected unqualified-id before 'return'
   13 |         return 0;
      |         ^~~~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;

int main(){
	ll a[7];
	for(int i=0; i<7; i++) cin >> a[i];
	ll ans=a[1];
	ll p=2*(a[0]/2+a[3]/2+a[4]/2);
	ll q=3+2*((a[0]-1)/2+(a[3]-1)/2+(a[4]-1)/2);
	if(a[0]>0 && a[3]>0 && a[4]>0) ans+=max({p, q});
	else ans+=p;
	cout << ans << endl;
	return 0;
}#include <bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;

int main(){
	ll a[7];
	for(int i=0; i<7; i++) cin >> a[i];
	ll ans=a[1];
	ll p=2*(a[0]/2+a[3]/2+a[4]/2);
	ll q=3+2*((a[0]-1)/2+(a[3]-1)/2+(a[4]-1)/2);
	if(a[0]>0 && a[3]>0 && a[4]>0) ans+=max({p, q});
	else ans+=p;
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc:18:2: error: stray '#' in program
   18 | }#include <bits/stdc++.h>
      |  ^
a.cc:18:3: error: 'include' does not name a type
   18 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:25:5: error: redefinition of 'int main()'
   25 | int main(){
      |     ^~~~
a.cc:8:5: note: 'int main()' previously defined here
    8 | int main(){
      |     ^~~~
Language: C++

#include <assert.h>
#include <limits.h>
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
 
using ll = long long;
using P = std::pair<ll, ll>;

#define rep(i, a, b) for (ll(i) = (a); i < (b); i++)
#define all(i) i.begin(), i.end()
#define debug(i) std::cerr << "debug " << i << std::endl
 
template <typename T1, typename T2>
std::ostream& operator<<(std::ostream& os, std::pair<T1, T2> pa) {
  return os << pa.first << " " << pa.second;
}
 
template <typename T>
std::ostream& operator<<(std::ostream& os, std::vector<T> vec) {
  for (int i = 0; i < vec.size(); i++)os << vec[i] << (i + 1 == vec.size() ? "" : " ");
  return os;
}

template<typename T1,typename T2>
inline bool chmax(T1& a,T2 b){return a<b && (a=b,true);}

template<typename T1,typename T2>
inline bool chmin(T1& a,T2 b){return a>b && (a=b,true);}
 
// const ll MOD = 998244353;
const ll MOD = 1e9 + 7;

ll pow_mod(ll a, ll b, ll mod=-1) {
  if ((a == 0)||(mod!=-1&&a%mod==0)) {
    return 0;
  }

  ll x = 1;

  while (b > 0) {
    if (b & 1) {
      x = (mod!=-1)?(x * a) % mod:x*a;
    }
    a = (mod!=-1)?(a * a) % mod:a*a;
    b >>= 1;
  }
  return x;
}

int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

  ll i,o,t,j,l,s,z;
  std::cin>>i>>o>>t>>j>>l>>s>>z;

  ll ans=o+(i/2)*2+(j/2)*2+(l/2)*2;

  if(i==0||l==0||j==0){
    std::cout<<ans;
    return 0;
  }

  chmax(ans,o+((i-1)/2)*2+((j-1)/2)*2+((l-1)/2)*2+2)
 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:79:53: error: expected ';' before 'return'
   79 |   chmax(ans,o+((i-1)/2)*2+((j-1)/2)*2+((l-1)/2)*2+2)
      |                                                     ^
      |                                                     ;
   80 | 
   81 |   return 0;
      |   ~~~~~~
Language: C++

#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
#include <queue>
#define inf 0x3f3f3f3f
#define cases(t) for (int cas = 1; cas <= int(t); ++cas)
typedef long long ll;
typedef double db;
using namespace std;

#ifdef NO_ONLINE_JUDGE
#define LOG(args...) do { cout << #args << " -> "; err(args); } while (0)
void err() { cout << endl; }
template<typename T, typename... Args> void err(T a, Args... args) { cout << a << ' '; err(args...); }
#else
#define LOG(...)
#endif

ll i, o, t, j, l, s, z;

int main() {
    scanf("%lld%lld%lld%lld%lld%lld%lld", &i, &o, &t, &j, &l, &s, &z);
    ll mn = min(i, min(j, l));
    ll ans1 = o * 2 + mn * 6;
    ans1 += (i - mn) / 2 * 4 + (j - mn) / 2 * 4 + (l - mn) / 2 * 4;
    mn = max(mn - 1, 0);
    ll ans2 = o * 2 + mn * 6;
    ans1 += (i - mn) / 2 * 4 + (j - mn) / 2 * 4 + (l - mn) / 2 * 4;
    printf("%lld\n", max(ans1, ans2) / 2);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:13: error: no matching function for call to 'max(ll, int)'
   33 |     mn = max(mn - 1, 0);
      |          ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:33:13: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   33 |     mn = max(mn - 1, 0);
      |          ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:33:13: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   33 |     mn = max(mn - 1, 0);
      |          ~~~^~~~~~~~~~~
Language: C++

#include <iostream> 
using  namespace std;

int main () {
     long  long a, b, c, d, e, f, g;
     while (cin >> a >> b >> c >> d >> e >> f >> g) {
         long  long res = 0 ;
         long  long m = min (a, min (d, e));
         for ( long  long i = max (m- 2 , 0LL ); i <= m; ++ i) {
             long  long tmp = i * 3 ;
             long  long na = a-i, nd = d-i, ne = e-i;
            tmp + = na / 2 * 2 ;
            tmp + = nd / 2 * 2 ;
            tmp + = ne / 2 * 2 ;
            res = max (res, tmp);
        }
        cout << res + b << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: expected primary-expression before '=' token
   12 |             tmp + = na / 2 * 2 ;
      |                   ^
a.cc:13:19: error: expected primary-expression before '=' token
   13 |             tmp + = nd / 2 * 2 ;
      |                   ^
a.cc:14:19: error: expected primary-expression before '=' token
   14 |             tmp + = ne / 2 * 2 ;
      |                   ^
Language: C++

#include <iostream> 
using  namespace std;

int main () {
     long  long a, b, c, d, e, f, g;
     while (cin >> a >> b >> c >> d >> e >> f >> g) {
         long  long res = 0 ;
         long  long m = min (a, min (d, e));
         for ( long  long i = max (m- 2 , 0LL ); i <= m; ++ i) (
             long  long tmp = i * 3 ;
             long  long na = a-i, nd = d-i, ne = e-i;
            tmp + = na / 2 * 2 ;
            tmp + = nd / 2 * 2 ;
            tmp + = ne / 2 * 2 ;
            res = max (res, tmp);
        }
        cout << res + b << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected primary-expression before 'long'
   10 |              long  long tmp = i * 3 ;
      |              ^~~~
a.cc:9:65: error: expected ')' before 'long'
    9 |          for ( long  long i = max (m- 2 , 0LL ); i <= m; ++ i) (
      |                                                                ~^
      |                                                                 )
   10 |              long  long tmp = i * 3 ;
      |              ~~~~                                                
a.cc:11:32: error: 'i' was not declared in this scope
   11 |              long  long na = a-i, nd = d-i, ne = e-i;
      |                                ^
a.cc:12:13: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   12 |             tmp + = na / 2 * 2 ;
      |             ^~~
      |             tm
a.cc:12:19: error: expected primary-expression before '=' token
   12 |             tmp + = na / 2 * 2 ;
      |                   ^
a.cc:13:19: error: expected primary-expression before '=' token
   13 |             tmp + = nd / 2 * 2 ;
      |                   ^
a.cc:13:21: error: 'nd' was not declared in this scope; did you mean 'na'?
   13 |             tmp + = nd / 2 * 2 ;
      |                     ^~
      |                     na
a.cc:14:19: error: expected primary-expression before '=' token
   14 |             tmp + = ne / 2 * 2 ;
      |                   ^
a.cc:14:21: error: 'ne' was not declared in this scope; did you mean 'na'?
   14 |             tmp + = ne / 2 * 2 ;
      |                     ^~
      |                     na
a.cc:17:17: error: 'res' was not declared in this scope
   17 |         cout << res + b << endl;
      |                 ^~~
a.cc: At global scope:
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<bits/stdc++.h>
#include <math.h>
#include <algorithm>
#include <functional>
#include<iostream>
#include <string>
using namespace std;
typedef long long ll;

int main() {
    int a,b,c,d,e,f,g,ans;
	cin >> a>> b>> c>> d>> e>> f >> g;
    
    int s=min({a,d,e});
    a-=s;
    d-=s;
    e-=s;
    int k = a%2+d%2+e%2;
    if(s==0)k=0;
    ll ans=3*s+(a/2)*2+b+(d/2)*2+(e/2)*2+max(k-1,0);
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:8: error: conflicting declaration 'll ans'
   20 |     ll ans=3*s+(a/2)*2+b+(d/2)*2+(e/2)*2+max(k-1,0);
      |        ^~~
a.cc:11:23: note: previous declaration as 'int ans'
   11 |     int a,b,c,d,e,f,g,ans;
      |                       ^~~
Language: C++

#include<bits/stdc++.h>
#include <math.h>
#include <algorithm>
#include <functional>
#include<iostream>
#include <string>
using namespace std;
typedef long long ll;

int main() {
    int a,b,c,d,e,f,g,ans;
	cin >> a>> b>> c>> d>> e>> f >> g;
    
    int s=min({a,d,e});
    a-=s;
    d-=s;
    e-=s;
    int k = a%2+d%2+e%2;
    if(s==0)k=0;
    ll ans=3*s+(a/2)*2+b+(d/2)*2+(e/2)*2+max(k-1,0)
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:8: error: conflicting declaration 'll ans'
   20 |     ll ans=3*s+(a/2)*2+b+(d/2)*2+(e/2)*2+max(k-1,0)
      |        ^~~
a.cc:11:23: note: previous declaration as 'int ans'
   11 |     int a,b,c,d,e,f,g,ans;
      |                       ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define pb push_back
#define mp make_pair
#define rep(i,n) for(int i=0;i<(n);++i)
const int mod=1000000007;
const int mod1=998244353;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll ai,ao,at,aj,al,as,az;cin >> ai >> ao >> at >> aj >> al >> as >> az;
	if(aj%2==1 && al%2==1){
		if(ai%2==0){
			ai-=2;
			aj--;
			al--;
			ans+=4;
		}
		else{
			ai--;
			aj--;
			al--;
			ans+=3;
		}
	}
	else if(ai%2==1 && aj%2==1 && al>0){
		ai--;
		aj--;
		al--;
		ans+=3;
	}
	else if(ai%2==1 && al%2==1 && aj>0){
		ai--;
		aj--;
		al--;
		ans+=3;
	}
	ans+=ai/2*2+aj/2*2+al/2*2;
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: 'ans' was not declared in this scope; did you mean 'as'?
   20 |                         ans+=4;
      |                         ^~~
      |                         as
a.cc:26:25: error: 'ans' was not declared in this scope; did you mean 'as'?
   26 |                         ans+=3;
      |                         ^~~
      |                         as
a.cc:33:17: error: 'ans' was not declared in this scope; did you mean 'as'?
   33 |                 ans+=3;
      |                 ^~~
      |                 as
a.cc:39:17: error: 'ans' was not declared in this scope; did you mean 'as'?
   39 |                 ans+=3;
      |                 ^~~
      |                 as
a.cc:41:9: error: 'ans' was not declared in this scope; did you mean 'as'?
   41 |         ans+=ai/2*2+aj/2*2+al/2*2;
      |         ^~~
      |         as
Language: Java

import java.io.BufferedReader;
    import java.io.InputStreamReader;
     
    public class Main {
    	public static void main(String[] args) throws Exception {
    		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    		String[] sa = br.readLine().split(" ");
    		int i = Integer.parseInt(sa[0]);
    		int o = Integer.parseInt(sa[1]);
    		int j = Integer.parseInt(sa[3]);
    		int l = Integer.parseInt(sa[4]);
    		br.close();
     
    		long ans = o;
    		while ((j>=0) && (l>=0) && (i>=0)) {
    			ans += 3;
    			i--;
    			j--;
    			l--;
    		}
          
          if(j==0 && l%2==1 && i%2==1){
            ans +=1;
          }
          if(l==0 && j%2==1 && i%2==1){
            ans +=1;
          }
          if(i=0 && l%2==1 && i%2==1){
            ans +=1;
          }
          
    		ans += i / 2 * 2;
    		ans += j / 2 * 2;
    		ans += l / 2 * 2;
    		System.out.println(ans);
    	}
    }

Compiler output:
Main.java:28: error: bad operand types for binary operator '&&'
          if(i=0 && l%2==1 && i%2==1){
                 ^
  first type:  int
  second type: boolean
Main.java:28: error: incompatible types: int cannot be converted to boolean
          if(i=0 && l%2==1 && i%2==1){
              ^
2 errors
Language: Java

    import java.io.BufferedReader;
    import java.io.InputStreamReader;
     
    public class Main {
    	public static void main(String[] args) throws Exception {
    		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    		String[] sa = br.readLine().split(" ");
    		int i = Integer.parseInt(sa[0]);
    		int o = Integer.parseInt(sa[1]);
    		int j = Integer.parseInt(sa[3]);
    		int l = Integer.parseInt(sa[4]);
    		br.close();
     
    		long ans = o;
    		while (j>=0 && l>=0 && i>=0) {
    			ans += 3;
    			i--;
    			j--;
    			l--;
    		}
          
          if((j==0 && l%2==1 && i%2==1)||(l==0 && j%2==1 && i%2==1)||(i=0 && l%2==1 && i%2==1)){
            ans +=1;
          }
          
    		ans += i / 2 * 2;
    		ans += j / 2 * 2;
    		ans += l / 2 * 2;
    		System.out.println(ans);
    	}
    }

Compiler output:
Main.java:22: error: bad operand types for binary operator '&&'
          if((j==0 && l%2==1 && i%2==1)||(l==0 && j%2==1 && i%2==1)||(i=0 && l%2==1 && i%2==1)){
                                                                          ^
  first type:  int
  second type: boolean
Main.java:22: error: bad operand types for binary operator '||'
          if((j==0 && l%2==1 && i%2==1)||(l==0 && j%2==1 && i%2==1)||(i=0 && l%2==1 && i%2==1)){
                                                                   ^
  first type:  boolean
  second type: int
2 errors
Language: C++

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

static const int IINF = 1 << 30;
static const long long LINF = 1LL << 60;
static const long long MOD = 1.0e+9 + 7;

template <typename T> std::vector<T> vectors(std::size_t n, T val) {
  return std::vector<T>(n, val);
}

template <typename T, typename... Args>
auto vectors(std::size_t n, Args... args) {
  return std::vector<decltype(vectors<T>(args...))>(n, vectors<T>(args...));
}

template <class T> inline bool chmin(T &a, const T &b) {
  return (a > b) ? a = b, true : false;
}

template <class T> inline bool chmax(T &a, const T &b) {
  return (a < b) ? a = b, true : false;
}

template <class T> inline void chadd(T &a, const T &b) {
  a += b, a %= MOD;
  // TODO minus case
}

template <class T>
std::ostream &operator<<(std::ostream &s, const std::vector<T> &v) {
  if (v.empty())
    return s;
  s << *v.begin();
  for (auto iter = v.begin() + 1; iter != v.end(); ++iter)
    if (std::is_fundamental<T>::value)
      s << " " << *iter;
    else
      s << std::endl << *iter;
  return s;
}

int main() {
  // Input
  long long aI, aO, aT, aJ, aL, aS, aZ;
  std::cin >> aI >> aO >> aT >> aJ >> aL >> aS >> aZ;

  // Main
  long long res1 = 0;
  res1 += aO;
  long long tmp = std::min({aI, aJ, aL});
  res1 += 3 * tmp;
  aI -= tmp;
  aJ -= tmp;
  aL -= tmp;
  if (aI == 0) {
    res1 += (aJ / 2) * 2;
    res1 += (aL / 2) * 2;
  } else if (aJ == 0) {
    res1 += (aI / 2) * 2;
    res1 += (aL / 2) * 2;
  } else {
    assert(aL == 0);
    res1 += (aI / 2) * 2;
    res1 += (aJ / 2) * 2;
  }
  if (aI + aJ + aL % 6 == 5)
    res1 += 1;

  long long res2 = 0;
  res2 += aO;
  long long tmp = std::min({aI, aJ, aL}) - 1;
  if (tmp < 0)
    tmp = 0;
  res2 += 3 * tmp;
  aI -= tmp;
  aJ -= tmp;
  aL -= tmp;
  if (aI <= 1) {
    res2 += (aJ / 2) * 2;
    res2 += (aL / 2) * 2;
  } else if (aJ <= 1) {
    res2 += (aI / 2) * 2;
    res2 += (aL / 2) * 2;
  } else {
    assert(aL <= 1);
    res2 += (aI / 2) * 2;
    res2 += (aJ / 2) * 2;
  }
  if (aI + aJ + aL % 6 == 5)
    res2 += 1;

  // Output
  std::cout << std::max(res1, res2) << std::endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:75:13: error: redeclaration of 'long long int tmp'
   75 |   long long tmp = std::min({aI, aJ, aL}) - 1;
      |             ^~~
a.cc:54:13: note: 'long long int tmp' previously declared here
   54 |   long long tmp = std::min({aI, aJ, aL});
      |             ^~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    long long a, b, c, d, e, f, g;
    while (cin >> a >> b >> c >> d >> e >> f >> g) {
        long long res = 0;
        long long m = min(a, min(d, e));
        for (long long i = max(m-2, 0); i <= m; ++i) {
            long long tmp = i * 3;
            long long na = a - i, nd = d - i, ne = e - i;
            tmp += na/2 * 2;
            tmp += nd/2 * 2;
            tmp += ne/2 * 2;
            res = max(res, tmp);
        }
        cout << res + b << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: no matching function for call to 'max(long long int, int)'
    9 |         for (long long i = max(m-2, 0); i <= m; ++i) {
      |                            ~~~^~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:9:31: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
    9 |         for (long long i = max(m-2, 0); i <= m; ++i) {
      |                            ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define evn(a) (a<0?-1:(a)/2*2)
int main(){
  long I,O,J,L;
  cin>>I>>O>>J>>J>>L;
  cout<<max(O+max(evn(I)+evn(J)+evn(L),evn(I-1)+evn(J-1)+evn(L-1)+3),0);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: no matching function for call to 'max(long int, int)'
    7 |   cout<<max(O+max(evn(I)+evn(J)+evn(L),evn(I-1)+evn(J-1)+evn(L-1)+3),0);
      |         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:7:12: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
    7 |   cout<<max(O+max(evn(I)+evn(J)+evn(L),evn(I-1)+evn(J-1)+evn(L-1)+3),0);
      |         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:7:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
    7 |   cout<<max(O+max(evn(I)+evn(J)+evn(L),evn(I-1)+evn(J-1)+evn(L-1)+3),0);
      |         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~