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

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <map>
#define eps 0.0000000001
#define maxn 30009
#define inf 0x3f3f3f3f
#define mod 1000000009
#define ll long long
using namespace std;
int n,m;
struct ee
{
    int to;
    ll v;
};
vector<ee> g[maxn];
ll d[maxn];
int in[maxn];
bool v[maxn],vv[maxn];
int main()
{
    //freopen("d:\\in.txt","r",stdin);
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        ee p;
        int a;
        scanf("%d%d%lld",&a,&p.to,&p.v);
        g[a].push_back(p);
    }
    memset(in,0,sizeof(in));
    queue<int> q;
    bool ff=false;
    for(int i=1;i<=maxn-5;i++)
        d[i]=-10000000000000000;
    q.push(1);
    d[1]=0;
    ll ans;
    while(!q.empty())
    {
        int u=q.front();
        q.pop();
        v[u]=false;
        for(int i=0;i<g[u].size();i++)
        {
            ee r=g[u][i];
            if(d[r.to]<d[u]+r.v)
            {
                in[r.to]++;
                if(in[r.to]>4000)
                {
                    ann=d[u];
                }
                if(in[r.to]>5000)
                {
                    if(ann<d[u])
                    {
                        ff=true;
                        break;
                    }
                }
                d[r.to]=d[u]+r.v;
                if(v[r.to]==false)
                {
                    q.push(r.to),v[r.to]=true;
                    in[r.to]++;
                }
            }
        }
        if(ff)
            break;
    }
    if(ff)
        printf("inf\n");
    else
        printf("%lld\n",d[n]);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:57:21: error: 'ann' was not declared in this scope; did you mean 'ans'?
   57 |                     ann=d[u];
      |                     ^~~
      |                     ans
a.cc:61:24: error: 'ann' was not declared in this scope; did you mean 'ans'?
   61 |                     if(ann<d[u])
      |                        ^~~
      |                        ans
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<int,ll> P;
const ll INF=9000000000000000000LL;

int N,M;
ll score[1234];
bool X[1234][1234];
vector<P> e[2345];

void dfs(int s){
    if(s==N) return;
    for(int i=0; i<e[s].size(); i++){
        score[e[s][i].first]=max(score[e[s][i].first],score[s]+e[s][i].second);
        dfs(e[s][i].first);
    }
    return;
}

int main(){

cin>>N>>M;

for(int i=0; i<M; i++){
    int a,b; ll c;
    scanf("%d %d %lld",&a,&b,&c);
    X[a][b]=1;
    e[a].push_back(P(b,c));
}

for(int i=1; i<=N; i++){
　　for(int j=1; j<=N; j++){
    if(X[i][j]==1&&X[j][i]==1){
        cout<<"inf"<<endl; return 0;
    }
　　}
}

for(int i=1; i<=N; i++) score[i]=-INF;

score[1]=0LL;
dfs(1);

cout<<score[N]<<endl;

return 0;
 
}

Compiler output:
a.cc:34:1: error: extended character 　 is not valid in an identifier
   34 | 　　for(int j=1; j<=N; j++){
      | ^
a.cc:34:1: error: extended character 　 is not valid in an identifier
a.cc:38:1: error: extended character 　 is not valid in an identifier
   38 | 　　}
      | ^
a.cc:38:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:34:9: error: expected primary-expression before 'int'
   34 | 　　for(int j=1; j<=N; j++){
      |         ^~~
a.cc:34:18: error: 'j' was not declared in this scope
   34 | 　　for(int j=1; j<=N; j++){
      |                  ^
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <functional>
#include <cmath>
#include <complex>
#include <cctype>
#include <cassert>
#include <sstream>
#include <ctime>
#include <cstdlib>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()

template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, pii> P;

const ll INF = 1ll<<60;
const ll MOD = 1000000007;
const double EPS  = 1e-10;

int n, m;
int cnt[112345];
ll d[112345];
vector<pll> g[112345];

int main() {
	cin >> n >> m;
	REP(i, m) {
		ll a, b, c;
		scanf("%lld %lld %lld", &a, &b, &c);
		g[a - 1].push_back(pll(b - 1, c));
	}
	
	fill(d, d + n, -INF);
	
	priority_queue<pll> pq;
	pq.push(pll(0, 0));
	
	int cnt = 0;
	
	bool ng = false;
	
	while (!pq.empty()) {
		pll now = pq.top();
		pq.pop();
		
		ll pos = now.second;
		ll cost = now.first;
		
		if (chmax(d[pos], cost)) {
			cnt[pos]++;
			if (cnt[n - 1] >= 20) {
				ng = true;
				break;
			}
		}
		else continue;
		
		if (cnt >= 10000000) break;
		
		REP(i, g[pos].size()) {
			ll next = g[pos][i].first;
			ll nextc = g[pos][i].second + cost;
			
			if (d[next] >= nextc) continue;
			pq.push(pll(nextc, next));
		}
	}
	
	if (ng) puts("inf");
	else cout << d[n - 1] << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:67:28: error: invalid types 'int[ll {aka long long int}]' for array subscript
   67 |                         cnt[pos]++;
      |                            ^
a.cc:68:32: error: invalid types 'int[int]' for array subscript
   68 |                         if (cnt[n - 1] >= 20) {
      |                                ^
Language: C++



#if 1
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <array>
#include <deque>
#include <algorithm>
#include <utility>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <numeric>
#include <assert.h>

auto& in = std::cin;
auto& out = std::cout;


const int MAX_E = 2000;
const int MAX_V = 1000;
const int64_t INF = 10000000000000000;
// 頂点fromから頂点toへのコストcostの辺
struct edge { int from, to; int64_t cost; };
edge es[MAX_E]; // 辺
int64_t d[MAX_V]; // 最短距離
int V, E; // Vは頂点数、Eは辺数
		  // s番目の頂点から各頂点への最短距離を求める
void shortest_path(int s) {
	for (int i = 0; i < V; i++) d[i] = INF;
	d[s] = 0;
	while (true) {
		bool update = false;
		for (int i = 0; i < E; i++) {
			edge e = es[i];
			if (d[e.from] != INF && d[e.to] > d[e.from] + e.cost) {
				d[e.to] = d[e.from] + e.cost;
				update = true;
			}
		}
		if (!update) break;
	}
}
// trueなら負の閉路が存在する
bool find_negative_loop() {
	memset(d, 0, sizeof(d));
	for (int i = 0; i < V; i++) {
			for (int j = 0; j < E; j++) {
				edge e = es[j];
				if (d[e.to] > d[e.from] + e.cost) {
					d[e.to] = d[e.from] + e.cost;
					// n回目にも更新があるなら負の閉路が存在する
					if (i == V - 1) return true;
				}
			}
	}
	return false;
}

int main()
{
	using std::endl;
	in.sync_with_stdio(false);
	out.sync_with_stdio(false);

	in >> V>>E;
	for (int32_t i = 0; i < E; ++i)
	{
		int a, b, c;
		in >> a >> b >> c; --a; --b; c = -c;
		es[i] = edge{ a,b,c };
	}
	if (find_negative_loop()) {
		std::cout << "inf\n"; return 0;
	}
	shortest_path(0);
	std::cout << -d[V - 1] << std::endl;
	return 0;
}
#endif


Compiler output:
a.cc: In function 'bool find_negative_loop()':
a.cc:54:9: error: 'memset' was not declared in this scope
   54 |         memset(d, 0, sizeof(d));
      |         ^~~~~~
a.cc:23:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   22 | #include <assert.h>
  +++ |+#include <cstring>
   23 |
Language: Java

a,b,c=map(int,input().split())
cnt=0

if a==b==c and a%2==0:
  print(-1)
   
else:
  while a%2==0 and b%2==0 and c%2==0:
    a,b,c=(b+c)//2,(a+c)//2,(a+b)//2
    cnt+=1
  print(cnt)


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
a,b,c=map(int,input().split())
^
1 error
Language: C++

#include <bits/stdc++.h>
#define LL long long
#define PII pair
#define MP(x, y) make_pair((x),(y))
#define fi first
#define se second
#define PB(x) push_back((x))
#define MMG(x) memset((x), -1,sizeof(x))
#define MMF(x) memset((x),0,sizeof(x))
#define MMI(x) memset((x), INF, sizeof(x))
using namespace std;
 
const int INF = 0x3f3f3f3f;
const int N = 1e5+20;
const double eps = 1e-8;
 
char mp[1000][1000];
int dir[4][2] = {1, 0, -1, 0, 0, 1, 0, -1};
int vis[1000][1000];
int n, m, k;
int bfs(int sx, int sy)
{
    MMF(vis);
    int ans = INF;
    queueq;
    q.push(MP(sx, sy));
    while(!q.empty())
    {
        PII nw = q.front();
        q.pop();
        int sp = min(min(nw.fi - 1, nw.se - 1), min(n - nw.fi , m - nw.se));
        ans = min(sp / k + ((sp%k)?1:0), ans);
        for(int i = 0; i < 4; i++)
        {
            int nx = nw.fi + dir[i][0];
            int ny = nw.se + dir[i][1];
            if(nx > 0 && ny > 0 && nx <= n && ny <= m && mp[nx][ny] == '.')
            {
                if(!vis[nx][ny] && abs(nx - sx) + abs(ny - sy) <= k)
                    vis[nx][ny] = 1, q.push(MP(nx, ny));
            }
        }
    }
    return ans;
}
 
int main()
{
    while(cin >> n >> m >> k)
    {
        getchar();
        int sx = -1, sy = -1;
        for(int i = 1; i <= n; i++)
        {
            for(int j = 1; j <= m; j++)
            {
                scanf("%c",&mp[i][j]);
                if(mp[i][j] == 'S')
                    sx = i, sy = j;
            }
            getchar();
        }   
        int ans = bfs(sx, sy);
        printf("%d\n", ans + 1);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int bfs(int, int)':
a.cc:25:5: error: 'queueq' was not declared in this scope
   25 |     queueq;
      |     ^~~~~~
a.cc:26:5: error: 'q' was not declared in this scope
   26 |     q.push(MP(sx, sy));
      |     ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(long long i = 0; i < n; i++)
using ll = long long;
using ld = long double;
using namespace std;
int main() {
  int A, B, C, a, b, c, N = 0;
  cin >> A >> B >> C;
  bool b = true;
  a = A;
  b = B;
  c = C;
  while(true) {
    A = B / 2 + C / 2;
    B = A / 2 + C / 2;
    C = A / 2 + B / 2;
    N++;
    if (A % 2 == 1 || B % 2 == 1 || C % 2 == 1) {break;}
    if (A == a && B == b && C == c) {
      b = false;
      break;
    }
  }
  if (b) {cout << N << endl;}
  else {cout << -1 << endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: conflicting declaration 'bool b'
    9 |   bool b = true;
      |        ^
a.cc:7:19: note: previous declaration as 'int b'
    7 |   int A, B, C, a, b, c, N = 0;
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = 1; i < (int)(n+1); i++)
int main() {
  int A,B,C;
  cin>>A>>B>>C;
  int ans=true;
  rep(i,100000000){
      if(A==B&&B==C)
      {
        	if(i==0){
              if(A%2==1||B%2==1||C%2==1){
              cout<<0<<endl;
              break:}
            }
          cout<<-1<<endl;
        	break;
      }
      int D=A;
      int E=B;
      int F=C;
      A=(E+F)/2;
      B=(D+F)/2;
      C=(D+E)/2;
      if(A%2==1||B%2==1||C%2==1){
          cout<<i+1<<endl;
        break;
      }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: expected ';' before ':' token
   17 |               break:}
      |                    ^
      |                    ;
a.cc:17:20: error: expected primary-expression before ':' token
Language: C++

int main(){
    int a_ini,b_ini,c_ini;      //A,B,Cの初期値
    cin>>a_ini>>b_ini>>c_ini;
 
    int a=a_ini;
    int b=b_ini;
    int c=c_ini;
 
    int count=0;
 
    int a_temp,b_temp,c_temp;
 
    while(a%2==0 && b%2==0 && c%2==0){
        a_temp=a;
        b_temp=b;
        c_temp=c;
        a=b_temp/2+c_temp/2;
        b=c_temp/2+a_temp/2;
        c=a_temp/2+b_temp/2;
        count++;
        if(a==a_ini && b==b_ini && c==c_ini){
            count=-1;
            break;
        }
    }
 
    cout<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope; did you mean 'c_ini'?
    3 |     cin>>a_ini>>b_ini>>c_ini;
      |     ^~~
      |     c_ini
a.cc:27:5: error: 'cout' was not declared in this scope; did you mean 'count'?
   27 |     cout<<count<<endl;
      |     ^~~~
      |     count
a.cc:27:18: error: 'endl' was not declared in this scope
   27 |     cout<<count<<endl;
      |                  ^~~~
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();

		sc.close();

		int ans = 0;
		int a2, b2, c2;

		while (a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
			if (a == b && b == c) {
				ans = -1;
				break;
			}

			a2 = b / 2 + c / 2;
			b2 = a / 2 + c / 2;
			c2 = a / 2 + b / 2;

			a = a2;
			b = b2;
			c = c2;

			ans++;
		}

		System.out.println(ans);
	}

}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

int main() {
  int a,b,c;
  int x,y,z,count;
  count = 0;
  cin >> a >> b >> c;
  while(){
    if(a%2==1 || b%2==1 || c%2==1){
      cout << count << endl;
      break;
    }
    else if(a==b && b==c && c==a){
      cout << -1 << endl;
      break;
    }
    x = b/2 + c/2;
    y = a/2 + c/2;
    z = a/2 + b/2;
    count++;
    if(x%2==1 || y%2==1 || z%2==1){
      cout << count << endl;
      break;
    }
    else{
      a = y/2 + z/2;
      b = x/2 + z/2;
      c = x/2 + y/2;
      count++;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected primary-expression before ')' token
    9 |   while(){
      |         ^
Language: C

#include <stdio.h>
int main(void){
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    if(a==b && b==c && c==a %% a%2==0 %% b%2==0 && c%2==0){
        printf("-1\n");
        return 0;
    }
    int ans=0;
    while(a%2==0 && b%2==0 && c%2==0){
        int _a=a, _b=b, _c=c;
        a=_b/2+_c/2;
        b=_a/2+_c/2;
        c=_a/2+_b/2;
        ans++;
    }
    printf("%d\n", ans);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:30: error: expected expression before '%' token
    5 |     if(a==b && b==c && c==a %% a%2==0 %% b%2==0 && c%2==0){
      |                              ^
Language: C++

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

#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384


int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} 
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;}    //最大公約数
int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;}     //最小公倍数
int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション
int nHr(int a,int b){return nCr(a+b-1,b);}       // 重複組み合わせ
int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}  //階乗
int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗
int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;}   //数字の各位の和
int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;}  // b進数の各位の和？
int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和

//以下long long ver
long long llmax(long long a,long long b){if(a>b){return a;}return b;}
long long llmin(long long a,long long b){if(a<b){return a;}return b;}
long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);}
long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;}
long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;}
long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;}
long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
long long llnHr(long long a,long long b){return llnCr(a+b-1,b);}
long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}
long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;}
long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;}
long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;}
long long llsankaku(long long x){return ((1+x)*x)/2;}

//double
double dbmax(double a,double b){if(a>b){return a;}return b;}
double dbmin(double a,double b){if(a<b){return a;}return b;}
double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);}


typedef pair<int, int> ii;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
#define forr(i,a,b) ; for(int i=(a); i<(b); i++)
#define clean(arr,val) memset(arr,val,sizeof(arr))
#define forn(i,n) forr(i,0,n)
#define PB push_back
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<pll> vpll;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

 
/*CODE START HERE*/
int main() {
  int64_t a,b,c;
  cin >> a >> b >> c;
  int count = 0;
  
  forn (i,40){
    if (a%2 == 1 || b%2 == 1 || c%2 == 1){
      cout << count << endl;
      return 0;
    }
    int na = (b+c)/2;
    int nb = (a+c)/2;
    int nc = (a+b)/2;
    count ++ ;
    a = na;
    b = nb;
    x = nc;
  }
  cout << -1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:75:5: error: 'x' was not declared in this scope
   75 |     x = nc;
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int l = ;
  vector <int> a(l);
  vector <int> b(l);
  vector <int> c(l);
  cin >> a.at(0) >> b.at(0) >> c.at(0);
  int ans =0 ;
  for ( int i=0 ;  ; i++){
    if ( a.at(i)%2==1 || b.at(i)%2==1 || c.at(i)%2==1){
      cout << ans << endl ;
      return 0 ;
    }
    if ( a.at(i)%4==0 && b.at(i)%4==0 && c.at(i)%4==0){
      cout << -1 << endl;
      return 0 ;
    }
    if ( a.at(i)%4==2 && b.at(i)%4==2 && c.at(i)%4==2){
      cout << -1 << endl;
      return 0 ;
    }
    a.at(i+1)  = (b.at(i)+c.at(i))/2 ;
    b.at(i+1)  = (c.at(i)+c.at(i))/2 ;
    c.at(i+1)  = (b.at(i)+a.at(i))/2 ;
    ans ++ ;              
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: expected primary-expression before ';' token
    5 |   int l = ;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int l = 1000000000
  vector <int> a(l);
  vector <int> b(l);
  vector <int> c(l);
  cin >> a.at(0) >> b.at(0) >> c.at(0);
  int ans =0 ;
  for ( int i=0 ;  ; i++){
    if ( a.at(i)%2==1 || b.at(i)%2==1 || c.at(i)%2==1){
      cout << ans << endl ;
      return 0 ;
    }
    if ( a.at(i)%4==0 && b.at(i)%4==0 && c.at(i)%4==0){
      cout << -1 << endl;
      return 0 ;
    }
    a.at(i+1)  = (b.at(i)+c.at(i))/2 ;
    b.at(i+1)  = (c.at(i)+c.at(i))/2 ;
    c.at(i+1)  = (b.at(i)+a.at(i))/2 ;
    ans ++ ;              
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'vector'
    6 |   vector <int> a(l);
      |   ^~~~~~
a.cc:9:10: error: 'a' was not declared in this scope
    9 |   cin >> a.at(0) >> b.at(0) >> c.at(0);
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int l = 1000000000
  vector <int> a(l), b(l) ,c(l);
  cin >> a.at(0) >> b.at(0) >> c.at(0);
  int ans =0 ;
  for ( int i=0 ;  ; i++){
    if ( a.at(i)%2==1 || b.at(i)%2==1 || c.at(i)%2==1){
      cout << ans << endl ;
      return 0 ;
    }
    if ( a.at(i)%4==0 && b.at(i)%4==0 && c.at(i)%4==0){
      cout << -1 << endl;
      return 0 ;
    }
    a.at(i+1)  = (b.at(i)+c.at(i))/2 ;
    b.at(i+1)  = (c.at(i)+c.at(i))/2 ;
    c.at(i+1)  = (b.at(i)+a.at(i))/2 ;
    ans ++ ;              
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'vector'
    6 |   vector <int> a(l), b(l) ,c(l);
      |   ^~~~~~
a.cc:7:10: error: 'a' was not declared in this scope
    7 |   cin >> a.at(0) >> b.at(0) >> c.at(0);
      |          ^
a.cc:7:21: error: 'b' was not declared in this scope
    7 |   cin >> a.at(0) >> b.at(0) >> c.at(0);
      |                     ^
a.cc:7:32: error: 'c' was not declared in this scope
    7 |   cin >> a.at(0) >> b.at(0) >> c.at(0);
      |                                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int l = 9000000000
  vector <int> a(l), b(l) ,c(l);
  cin >> a.at(0) >> b.at(0) >> c.at(0);
  int ans =0 ;
  for ( int i=0 ;  ; i++){
    if ( a.at(i)%2==1 || b.at(i)%2==1 || c.at(i)%2==1){
      cout << ans << endl ;
      return 0 ;
    }
    if ( a.at(i)%4==0 && b.at(i)%4==0 && c.at(i)%4==0){
      cout << -1 << endl;
      return 0 ;
    }
    a.at(i+1)  = (b.at(i)+c.at(i))/2 ;
    b.at(i+1)  = (c.at(i)+c.at(i))/2 ;
    c.at(i+1)  = (b.at(i)+a.at(i))/2 ;
    ans ++ ;              
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: warning: overflow in conversion from 'long int' to 'int' changes value from '9000000000' to '410065408' [-Woverflow]
    5 |   int l = 9000000000
      |           ^~~~~~~~~~
a.cc:6:3: error: expected ',' or ';' before 'vector'
    6 |   vector <int> a(l), b(l) ,c(l);
      |   ^~~~~~
a.cc:7:10: error: 'a' was not declared in this scope
    7 |   cin >> a.at(0) >> b.at(0) >> c.at(0);
      |          ^
a.cc:7:21: error: 'b' was not declared in this scope
    7 |   cin >> a.at(0) >> b.at(0) >> c.at(0);
      |                     ^
a.cc:7:32: error: 'c' was not declared in this scope
    7 |   cin >> a.at(0) >> b.at(0) >> c.at(0);
      |                                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  vector <int> a , b ,c;
  cin >> a.at(0) >> b.at(0) >> c.at(0);
  int ans =0 ;
  for ( int i=0 ;  ; i++){
    if ( a.at(i)%2=1 || b.at(i)%2=1 || c.at(i)%2=1){
      cout << ans << endl ;
      return 0 ;
    }
    if ( a.at(i)%4=0 && b.at(i)%4=0 && c.at(i)%4=0){
      cout << -1 << endl;
      return 0 ;
    }
    a.at(i+1)  = (b.at(i)+c.at(i))/2 ;
    b.at(i+1)  = (c.at(i)+c.at(i))/2 ;
    c.at(i+1)  = (b.at(i)+a.at(i))/2 ;
    ans ++ ;              
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:37: error: lvalue required as left operand of assignment
    9 |     if ( a.at(i)%2=1 || b.at(i)%2=1 || c.at(i)%2=1){
      |                                   ~~^~~~~~~~~~~~
a.cc:13:37: error: lvalue required as left operand of assignment
   13 |     if ( a.at(i)%4=0 && b.at(i)%4=0 && c.at(i)%4=0){
      |                                   ~~^~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  vecotr <int> a , b ,c;
  cin >> a.at(0) >> b.at(0) >> c.at(0);
  int ans =0 ;
  for ( int i=0 ;  ; i++){
    if ( a.at(i)%2=1 || b.at(i)%2=1 || c.at(i)%2=1){
      cout << ans << endl ;
      return 0 ;
    }
    if ( a.at(i)%4=0 && b.at(i)%4=0 && c.at(i)%4=0){
      cout << -1 << endl;
      return 0 ;
    }
    a.at(i+1)  = (b.at(i)+c.at(i))/2 ;
    b.at(i+1)  = (c.at(i)+c.at(i))/2 ;
    c.at(i+1)  = (b.at(i)+a.at(i))/2 ;
    ans ++ ;              
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'vecotr' was not declared in this scope
    5 |   vecotr <int> a , b ,c;
      |   ^~~~~~
a.cc:5:11: error: expected primary-expression before 'int'
    5 |   vecotr <int> a , b ,c;
      |           ^~~
a.cc:6:10: error: 'a' was not declared in this scope
    6 |   cin >> a.at(0) >> b.at(0) >> c.at(0);
      |          ^
a.cc:6:21: error: 'b' was not declared in this scope
    6 |   cin >> a.at(0) >> b.at(0) >> c.at(0);
      |                     ^
a.cc:6:32: error: 'c' was not declared in this scope
    6 |   cin >> a.at(0) >> b.at(0) >> c.at(0);
      |                                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b, c;
  cin >>a >>b >>c;
  
  if (a==b && b==c) {
    cout << -1 << endl;
  }
  else {
    int count = 0;
    while (1) {
      count ++;
      int a2 = a, b2 = b, c2 = c;
      
      a = (b2 + c2) / 2;
      b = (a2 + c2) / 2;
      c = (a2 + b2) / 2;
      
      if (a%2==1 || b%2==1 || c%2==1)
        break;
    }
    cout << count << endl;  
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int long long A; int long long B; int long long C;
  cin>>A>>B>>C;
  if(A%2!=0||B%2!=0||C%2!=0)
    cout<<0<<endl;
  else if (A==B&&A==C)
    cout<<-1<<endl;
  else {
    int L=A/2; int M=B/2; int N=C/2;
    int Ans=0;
    while(A%2==&&B%2==0&&C%2==0){
      Ans++;
      A=M+N;
      B=N+L;
      C=M+L;
      L=A/2;
      M=B/2;
      N=C/2;
    }
    cout<<Ans<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: invalid operands of types 'void*' and 'int' to binary 'operator%'
   13 |     while(A%2==&&B%2==0&&C%2==0){
      |                ~~~^~
      |                |   |
      |                |   int
      |                void*
a.cc:13:18: error: label 'B' used but not defined
   13 |     while(A%2==&&B%2==0&&C%2==0){
      |                  ^
Language: Java

import java.util.Scanner;ass Main{
 public static void main(String args[]){
  boolean flag=false;
  Scanner scan=new Scanner(System.in);
  String s;

  s=scan.next();
  int a=Integer.parseInt(s);
  s=scan.next();
  int b=Integer.parseInt(s);
  s=scan.next();
  int c=Integer.parseInt(s);

  int t1,t2,t3,ans=0;
  while(a*b*c!=0){
   t1=a%2;
   t2=b%2;
   t3=c%2;
   if(!(t1==t2&&t2==t3))break;
   a/=2;b/=2;c/=2;
   ans++;
  }
  if(a+b+c==0)System.out.println(-1);
  else System.out.println(ans);
 }

 ///////////////////////////////////////////////
 public static boolean prime(long a){
  if(a<=1)return false;
  for(int i=2;i*i<=a;i++){
   if(a%i==0)return false;
  }
  return true;
 }
 public static long llpow(long x,long n){
  long ans=1;
  for(int i=0;i<n;i++)ans*=x;
  return ans;
 }
 public static long max(long a,long b){
  if(a<b)return b;
  else return a;
 }
 public static long min(long a,long b){
  if(a>b)return b;
  else return a;
 }
 public static long cei(long x,long y){
  long ans=x/y;
  if(x%y!=0)ans++;
  return ans;
 }
 public static long gcd(long x,long y){
  return (y==1)?gcd(y,x%y):x;
 }
 public static long lcm(long x,long y){
  return x/gcd(x,y)*y;
 }
 public static long fact(long x){
  long ans=1;
  for(int i=0;i<x;i++)ans*=(x-i);
  return ans;
 }
 public static long ncr(long n,long r){
  long ans=1,l=2;
  for(int i=0;i<min(n-r,r);i++){
   ans*=(n-i);
   while(ans%l==0&&l<=min(r,n-r)){
    ans/=l;l++;
   }
  }
  return ans;
 }
 public static long npr(long n,long r){
  long ans=1;
  for(int i=0;i<r;i++)ans*=(n-i);
  return ans; 
 }
 public static long fib(int x){
  long fibo[]=new long[x+10];
  fibo[0]=1;fibo[1]=1;
  for(int i=2;i<x+1;i++)fibo[i]=fibo[i-1]+fibo[i-2];
  return fibo[x];
 }
 public static long dig(long n){
  long d=1,tmp=n;
  while(tmp/10>0){
   tmp/=10;d++;
  }
  return d;}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
import java.util.Scanner;ass Main{
                         ^
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
 public static void main(String args[]){
               ^
  (use --enable-preview to enable unnamed classes)
Main.java:91: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int A,B,C;
  cin>>A>>B>>C;
  for(;A%2==0 && B%2==0 && C%2==0;i++){
    int a=(B+C)/2,b=(A+C)/2,c=(A+B)/2;
    A=a,B=b;C=c;
    if(i>=30){
      cout<<-1<<endl;
      return 0;
    }
  }
  cout<<i<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: 'i' was not declared in this scope
    7 |   for(;A%2==0 && B%2==0 && C%2==0;i++){
      |                                   ^
a.cc:15:9: error: 'i' was not declared in this scope
   15 |   cout<<i<<endl;
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define fo(i,n) for(int i=0;i<n;i++)
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
int main(){
    int a,b,c;cin>>a>>b>>c;
    if(a%2!=0||c%2!=0||b%2!=0){
        cout << 0;return 0;
    }
    if else(a==b&&b==c){
        cout << -1;return 0;
    }
    else{
        int cnt =0;
        while(a%2==0&&b%2==0&&c%2==0){
            int y =b,z =a;
            a=b/2 + c/2; b=c/2+z/2;c=z/2 +y/2;
            ++cnt;
        }
        cout << cnt;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: expected '(' before 'else'
   10 |     if else(a==b&&b==c){
      |        ^~~~
      |        (
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else{
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int64_t a,b,c;
  cin>>a>>b>>c;
  if(a % 4 == b % 4&& b % 4 == c % 4) cout <<"-1"<<endl;
  else{int count=0;bool A;int64_t d=b/2+c/2,e=c/2+a/2,f=a/2+b/2;
       bool A=false;
while(a % 2 ==0 && b % 2 ==0 && c % 2 ==0){
 a=d;
  b=e;
  c=f;
  
  count++;

 	 }
cout << count <<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: redeclaration of 'bool A'
    8 |        bool A=false;
      |             ^
a.cc:7:25: note: 'bool A' previously declared here
    7 |   else{int count=0;bool A;int64_t d=b/2+c/2,e=c/2+a/2,f=a/2+b/2;
      |                         ^
Language: C++

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

int main () {
  long long A,B,C;
  cin >> A >> B >> C;
  long long cnt = 0;
  
  if (A%==1 || B%2==0 || C%2==0) {   
    cout << 0 << endl;
    return 0;
  }
  
  if (A==B && B==C) {
    cout << -1 << endl;
    return 0;
  }
  
  while (true) {
    if (A%==0 && B%2==0 && C%2==0) {   
      cnt++;
      long long a = B/2 + C/2;
      long long b = A/2 + C/2;
      long long c = A/2 + B/2;
      A = a;
      B = b;
      C = c;
    }
    else {
      cout << cnt << endl;
      break;
    }
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected primary-expression before '=' token
    9 |   if (A%==1 || B%2==0 || C%2==0) {
      |          ^
a.cc:20:12: error: expected primary-expression before '=' token
   20 |     if (A%==0 && B%2==0 && C%2==0) {
      |            ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
#define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
#define rrep(i,j,n) for(ll i = (ll)(j); i < (ll)(n); i++)
#define mrep(i,n) for (ll i = (ll)(n-1); i > 0; i--)
#define be(v) (v).begin(), (v).end()
#define scout cout << fixed << setprecision(20) 
ll INF = 1LL << 60;
ll mod = 1e9 + 7;

int main() {
	int a,b,c; cin >. a >> b >> c;
	if(a==b&&b==c) {
		cout << -1 << endl;
		reutrn 0;
	}
	int ans=0;
	while(a%2==0&&b%2==0&&c%2==0) {
		int A = a/2; int B = b/2; int C = c/2;
		a=B+C;
		b=A+C;
		c=A+B;
		ans++;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: expected primary-expression before '.' token
   15 |         int a,b,c; cin >. a >> b >> c;
      |                         ^
a.cc:18:17: error: 'reutrn' was not declared in this scope
   18 |                 reutrn 0;
      |                 ^~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<cmath>
#include<cstdio>
#include<queue>
using namespace std;
typedef pair<int,int> ii;
typedef long long ll;
const int INF=1e9;

struct UnionFind{
    vector<int> par,rank;
    int c;
    UnionFind(int n):par(n),rank(n,0){
        for(int i=0;i<n;i++) par[i]=1;
        c=n;
    }
    int root(int x){
        if(par[x]==x) return x;
        return par[x]=root(par[x]);
    }
    void unite(int x,int y){
        int rx=root(x);
        int ry=root(y);
        if(rx==ry) return;
        if(rank[rx]<rank[ry]){
            par[rx]=ry;
        }
        else{
            par[ry]=rx;
            if(rank[rx]==rank[ry]) rx++;
        }
        c--;
    }
    bool same(int x,int y){
        return root(x)==root(y);
    }
    
}

int main()
{
    int a,b,c;cin>>a>>b>>c;
    int ans=0;
    while(true){
        if(a&1||b&1||c&1) break;
        if(a==b&&b==c){
            ans=-1;break;
        }
        int p,q,r;
        p=a/2;q=b/2;r=c/2;
        a=q+r;b=p+r;c=p+q;
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc:41:2: error: expected ';' after struct definition
   41 | }
      |  ^
      |  ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A,B,C;
  int X,Y,Z;
  int count=0;
  cin>>A>>B>>C;
  if(A==B && B==C){
    cout<<-1<<endkl;
    return 0;
  }
  while(A%2==0 && B%2==0 && C%2==0){
    A/=2;
    B/=2;
    C/=2;
    X=A; Y=B; Z=C;
    A=Y+Z; B=X+Z; C=X+Y;
    count++;
  }
  cout<<count<<endl;
  return 0;
}

    

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'endkl' was not declared in this scope
   10 |     cout<<-1<<endkl;
      |               ^~~~~
Language: Java

import java.util.*;

public class Main{
	
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	long a=sc.nextLong(),b=sc.nextLong(),c=sc.nextLong();
    long f=0;
    if(a==b&&b==c){
      System.out.println(-1);
    }else{
      while(true){
        if(a%2!=0||b%2!=0||c%2!=0){
          break;
        }else{
          int ha=a/2,hb=b/2,hc=c/2;
          a=hb+hc;
          b=ha+hc;
          c=ha+hb;
          f++;
        }
      }
      System.out.println(f);
    }
  }
}


Compiler output:
Main.java:16: error: incompatible types: possible lossy conversion from long to int
          int ha=a/2,hb=b/2,hc=c/2;
                  ^
Main.java:16: error: incompatible types: possible lossy conversion from long to int
          int ha=a/2,hb=b/2,hc=c/2;
                         ^
Main.java:16: error: incompatible types: possible lossy conversion from long to int
          int ha=a/2,hb=b/2,hc=c/2;
                                ^
3 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  cin >> a >> b >> c;
  if(a==b&&b==c)cout << =1;
  else if(a%2==1||b%2==1||c%2==1)cout << 0;
  else{
    int i=0;
    while(a%2==0&&b%2==0&&c%2==0){
      a=(b+c)/2;
      b=(a+c)/2;
      c=(a+b)/2;
      i++;
    }
    cout << i;
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: expected primary-expression before '=' token
    6 |   if(a==b&&b==c)cout << =1;
      |                         ^
Language: C++

#include<iostream>
#define ll long long
int main()
{
  ll a,b,c,a1,b1,c1;
  int result;
  if(a%2 || b%2 || c%2)
  {
    cout<<0;
  }
  else if(a==b && b==c)
  {
    cout<<0;
  }
  else
  {
  	while(a%2==0 && b%2==0 && c%2==0)
  	{
      a1=a;
      b1=b;
      c1=c;
      a=b1/2+c1/2;
      b=a1/2+c1/2;
      c=a1/2+b1/2;
      result++;
    }
    cout<<result;
  }
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<0;
      |     ^~~~
      |     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout<<0;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:27:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   27 |     cout<<result;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main() {
  int a,b,c;
  cin >> a >> b >> c;
  int count=0;
  
  for(int i=1; i<=1000; i++){
    if(a%2 == 1 || b%2 == 1 || c%2 == 1){
      cout << count << endl;
      break;
    }
    
    else if(a == b && b == c){
      count = -1;
      cout << count << endl;
      break;
    }
    
    else{
      a=(b+c)/2
      b=(c+a)/2
      c=(a+b)/2
      count++;
    }
    
  }
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: expected ';' before 'b'
   22 |       a=(b+c)/2
      |                ^
      |                ;
   23 |       b=(c+a)/2
      |       ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int64_t A,B,C;
  cin>>A>>B>>C;
  int64_t ans=0;
  if(A==B && B==C){
  if(A%2==0)
    cout<<-1<<endl;
    else
      cout<<0<<endl;
  
  }else{
  int64_t ans=0;
    for(int i=1; ;i++){
    if(A%2==0 && B%2==0 C%2==0){
    int64_t a=(B+C)/2;
      int64_t b=(A+C)/2;
      int64_t c=(A+B)/2;
      A=a; B=b; C=c;
    
    }else break;
    
    }cout<<ans<<endl;
  
 }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: expected ')' before 'C'
   16 |     if(A%2==0 && B%2==0 C%2==0){
      |       ~                ^~
      |                        )
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int64_t A,B,C;
  cin>>A>>B>>C;
  sort(A.begin(),A.end());
  int64_t ans=0;
  if(A==B && B==C){
  if(A%2==0)
    cout<<-1<<endl;
    else
      cout<<0<<endl;
  
  }else{
  int64_t ans=0;
    for(int i=1; ;i++){
    if(A%2==0 && B%2==0 C%2==0){
    int64_t a=(B+C)/2;
      int64_t b=(A+C)/2;
      int64_t c=(A+B)/2;
      A=a; B=b; C=c;
    
    }else break;
    
    }cout<<ans<<endl;
  
 }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: request for member 'begin' in 'A', which is of non-class type 'int64_t' {aka 'long int'}
    6 |   sort(A.begin(),A.end());
      |          ^~~~~
a.cc:6:20: error: request for member 'end' in 'A', which is of non-class type 'int64_t' {aka 'long int'}
    6 |   sort(A.begin(),A.end());
      |                    ^~~
a.cc:17:24: error: expected ')' before 'C'
   17 |     if(A%2==0 && B%2==0 C%2==0){
      |       ~                ^~
      |                        )
Language: C++

#pragma GCC optimize("Ofast")
#include<iostream>
#include<cstdlib>
#include<cstdio>
#include<string>
#include<iomanip>
#include<algorithm>
#include<vector>
#include<math.h>
#include<utility>
using namespace std;


int main(){
    long long int a, b, c;
    cin >> a >> b >> c;
    int cn
    
    if(a == b && b == c && a % 2 != 0 || b % 2 != 0 || c % 2 != 0) {
        cout << -1 << endl;
        return 0;
    }

    while(a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
        int ahalf, bhalf, chalf;
        ahalf = a/2;
        bhalf = b/2;
        chalf = c/2;
        a = bhalf + chalf;
        b = ahalf + chalf;
        c = ahalf + bhalf;
        cnt++;
    }
    cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: expected initializer before 'if'
   19 |     if(a == b && b == c && a % 2 != 0 || b % 2 != 0 || c % 2 != 0) {
      |     ^~
a.cc:32:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   32 |         cnt++;
      |         ^~~
      |         int
a.cc:34:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   34 |     cout << cnt << endl;
      |             ^~~
      |             int
Language: C++

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

int main() {
  int A, B, C;
  cin >> A >> B >> C;
  int nowA = A, nowB = B, nowC = C;
  int time = 0;

  if((A == B) && (B == C)){
    if((A % 2 != 0) || (B % 2 != 0) || (C % 2 != 0)){
      break;
    }
    time = -1;
  }
  else{
    while((nowA % 2 == 0) && (nowB % 2 == 0) && (nowC % 2 == 0)){
      time++;
      nowA = (B / 2) + (C / 2);
      nowB = (A / 2) + (C / 2);
      nowC = (A / 2) + (B / 2);
      A = nowA, B = nowB, C = nowC;
    }
  }
  cout << time << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: break statement not within loop or switch
   12 |       break;
      |       ^~~~~
Language: C++

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

int main(){
  int A(0),B(0),C(0);
  cin >> A(0) >> B(0) >> C(0);
  if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
    cout << -1 << endl;
  }
  else{
    int i = 0;
    while(A(i)%2+B(i)%2+C(i)%2==0){
      int A(i+1) =B(i)/2+C(i)/2;
      int B(i+1) =C(i)/2+A(i)/2;
      int C(i+1) =A(i)/2+B(i)/2;
      i++;
    }
    cout << i << endl;
  }
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'A' cannot be used as a function
    6 |   cin >> A(0) >> B(0) >> C(0);
      |          ~^~~
a.cc:6:19: error: 'B' cannot be used as a function
    6 |   cin >> A(0) >> B(0) >> C(0);
      |                  ~^~~
a.cc:6:27: error: 'C' cannot be used as a function
    6 |   cin >> A(0) >> B(0) >> C(0);
      |                          ~^~~
a.cc:7:8: error: 'A' cannot be used as a function
    7 |   if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
      |       ~^~~
a.cc:7:14: error: 'B' cannot be used as a function
    7 |   if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
      |             ~^~~
a.cc:7:22: error: 'B' cannot be used as a function
    7 |   if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
      |                     ~^~~
a.cc:7:28: error: 'C' cannot be used as a function
    7 |   if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
      |                           ~^~~
a.cc:7:36: error: 'A' cannot be used as a function
    7 |   if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
      |                                   ~^~~
a.cc:12:12: error: 'A' cannot be used as a function
   12 |     while(A(i)%2+B(i)%2+C(i)%2==0){
      |           ~^~~
a.cc:12:19: error: 'B' cannot be used as a function
   12 |     while(A(i)%2+B(i)%2+C(i)%2==0){
      |                  ~^~~
a.cc:12:26: error: 'C' cannot be used as a function
   12 |     while(A(i)%2+B(i)%2+C(i)%2==0){
      |                         ~^~~
a.cc:13:18: error: expected ',' or ';' before '=' token
   13 |       int A(i+1) =B(i)/2+C(i)/2;
      |                  ^
a.cc:14:18: error: expected ',' or ';' before '=' token
   14 |       int B(i+1) =C(i)/2+A(i)/2;
      |                  ^
a.cc:15:18: error: expected ',' or ';' before '=' token
   15 |       int C(i+1) =A(i)/2+B(i)/2;
      |                  ^
Language: C++

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

int main(){
  int A,B,C;
  cin >> A(0) >> B(0) >> C(0);
  if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
    cout << -1 << endl;
  }
  else{
    int i = 0;
    while(A(i)%2+B(i)%2+C(i)%2==0){
      A(i+1) =B(i)/2+C(i)/2;
      B(i+1) =C(i)/2+A(i)/2;
      C(i+1) =A(i)/2+B(i)/2;
      i++;
    }
    cout << i << endl;
  }
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'A' cannot be used as a function
    6 |   cin >> A(0) >> B(0) >> C(0);
      |          ~^~~
a.cc:6:19: error: 'B' cannot be used as a function
    6 |   cin >> A(0) >> B(0) >> C(0);
      |                  ~^~~
a.cc:6:27: error: 'C' cannot be used as a function
    6 |   cin >> A(0) >> B(0) >> C(0);
      |                          ~^~~
a.cc:7:8: error: 'A' cannot be used as a function
    7 |   if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
      |       ~^~~
a.cc:7:14: error: 'B' cannot be used as a function
    7 |   if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
      |             ~^~~
a.cc:7:22: error: 'B' cannot be used as a function
    7 |   if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
      |                     ~^~~
a.cc:7:28: error: 'C' cannot be used as a function
    7 |   if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
      |                           ~^~~
a.cc:7:36: error: 'A' cannot be used as a function
    7 |   if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
      |                                   ~^~~
a.cc:12:12: error: 'A' cannot be used as a function
   12 |     while(A(i)%2+B(i)%2+C(i)%2==0){
      |           ~^~~
a.cc:12:19: error: 'B' cannot be used as a function
   12 |     while(A(i)%2+B(i)%2+C(i)%2==0){
      |                  ~^~~
a.cc:12:26: error: 'C' cannot be used as a function
   12 |     while(A(i)%2+B(i)%2+C(i)%2==0){
      |                         ~^~~
a.cc:13:8: error: 'A' cannot be used as a function
   13 |       A(i+1) =B(i)/2+C(i)/2;
      |       ~^~~~~
a.cc:13:16: error: 'B' cannot be used as a function
   13 |       A(i+1) =B(i)/2+C(i)/2;
      |               ~^~~
a.cc:13:23: error: 'C' cannot be used as a function
   13 |       A(i+1) =B(i)/2+C(i)/2;
      |                      ~^~~
a.cc:14:8: error: 'B' cannot be used as a function
   14 |       B(i+1) =C(i)/2+A(i)/2;
      |       ~^~~~~
a.cc:14:16: error: 'C' cannot be used as a function
   14 |       B(i+1) =C(i)/2+A(i)/2;
      |               ~^~~
a.cc:14:23: error: 'A' cannot be used as a function
   14 |       B(i+1) =C(i)/2+A(i)/2;
      |                      ~^~~
a.cc:15:8: error: 'C' cannot be used as a function
   15 |       C(i+1) =A(i)/2+B(i)/2;
      |       ~^~~~~
a.cc:15:16: error: 'A' cannot be used as a function
   15 |       C(i+1) =A(i)/2+B(i)/2;
      |               ~^~~
a.cc:15:23: error: 'B' cannot be used as a function
   15 |       C(i+1) =A(i)/2+B(i)/2;
      |                      ~^~~
Language: C++

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

int f(int X,int Y,int Z){
  
 
int main(){
  int A,B,C;
  cin >> A(0) >> B(0) >> C(0);
  if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
    cout << -1 << endl;
  }
  else{
    int i = 0;
    while(A(i)%2+B(i)%2+C(i)%2==0){
      A(i+1) =B(i)/2+C(i)/2;
      B(i+1) =C(i)/2+A(i)/2;
      C(i+1) =A(i)/2+B(i)/2;
      i++;
    }
    cout << i << endl;
  }
}
      


Compiler output:
a.cc: In function 'int f(int, int, int)':
a.cc:7:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    7 | int main(){
      |         ^~
a.cc:7:9: note: remove parentheses to default-initialize a variable
    7 | int main(){
      |         ^~
      |         --
a.cc:7:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:7:11: error: a function-definition is not allowed here before '{' token
    7 | int main(){
      |           ^
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:4:25: note: to match this '{'
    4 | int f(int X,int Y,int Z){
      |                         ^
a.cc:23:2: warning: no return statement in function returning non-void [-Wreturn-type]
   23 | }
      |  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int A,B,C;
  cin >> A >> B >> C;
  if (A%4==B%4 && B%4==C%4 && A%4=2){
    cout << -1 << endl;
  }
  else{
    int i = 0;
    while(A%2+B%2+C%2==0){
      A =B/2+C/2;
      B =C/2+A/2;
      C =A/2+B/2;
      i++;
    }
    cout << i << endl;
  }
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: lvalue required as left operand of assignment
    7 |   if (A%4==B%4 && B%4==C%4 && A%4=2){
      |       ~~~~~~~~~~~~~~~~~~~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int A,B,C;
  cin >> A >> B >> c;
  if (A%2+B%2+C%2!=0){
    cout << 0 << endl;
  }
  else if (A%4==B%4&&B%4==C%4){
    cout << -1 << endl;
  }
  else {
    cout << 1 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'c' was not declared in this scope
    6 |   cin >> A >> B >> c;
      |                    ^
Language: C

#include <stdio.h>

int main()
{
	int A, B, C;
	scanf("%d %d %d", &A, &B, &C);

	if (A == B && B == C) printf("-1\n");
	else {
		int a, b, c, count = 0
		while (A % 2 == 0 && B % 2 == 0 && C % 2 == 0) {
			count++;
			a = (B + C) / 2;
			b = (C + A) / 2;
			c = (A + B) / 2;
			A = a;
			B = b;
			C = c;
		}
		printf("%d\n", count);
	}
	fflush(stdout);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: expected ',' or ';' before 'while'
   11 |                 while (A % 2 == 0 && B % 2 == 0 && C % 2 == 0) {
      |                 ^~~~~