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

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
ll a,b,c;

int main() {

  cin >> a >> b >> c;

  if(a == b && b == c && A % 2 == 0) {
    cout <<"-1"<<endl;
    return 0;
  }

  ll ans = 0;

  while(a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
    ll s = a / 2;
    ll t = b / 2;
    ll r = c / 2;
    a = t + r;
    b = s + r;
    c = s + t;
    ans++;
  }

  cout << ans << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: 'A' was not declared in this scope
   12 |   if(a == b && b == c && A % 2 == 0) {
      |                          ^
Language: C++

#include<cstdio>
#include<cstring>
#include<vector>
#include<queue>
#include<algorithm>
#include<cmath>
#include<climits>
#include<string>
#include<set>
#include<map>
#include<iostream>
using namespace std;
#define rep(i,n) for(int i = 0;i<((int)(n));i++)
#define reg(i,a,b) for(int i = ((int)(a));i<=((int)(b));i++)
#define irep(i,n) for(int i = ((int)(n)-1);i>=0;i--)
#define ireg(i,a,b) for(int i = ((int)(b));i>=((int)(a));i--)
typedef long long int lli;
typedef pair<int, int> mp;
#define fir first
#define sec second
#define IINF INT_MAX
#define LINF LLONG_MAX
#define eprintf(...) fprintf(stderr,__VA_ARGS__)
#define pque(type) priority_queue<type,vector<type>,greater<type> >
#define memst(a,b) memset(a,b,sizeof(a))
 
int main(void){
	vector<lli> a(3, 0), b(3, 0);
	cin >> a[0] >> a[1] >> a[2];
	rep(i, 3) if(a[0]%2 == 1) {cout << '0' << endl; return 0;}
	lli n = accumulate(a.begin(), a.end(), 0ll);
	
	rep(i, 3){
		lli c = a[i]*3 - n;
		if(c == 0){	b[i] = LINF; continue;}
		while(c%2 == 0){	
			c /= 2;
			b[i]++;
		}
	}
	
	lli ans = *min_element(b.begin(), b.end());
	cout << (ans == LINF?-1:ans) << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: 'accumulate' was not declared in this scope
   31 |         lli n = accumulate(a.begin(), a.end(), 0ll);
      |                 ^~~~~~~~~~
Language: Java

  import java.util.Scanner;
 
    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();
      
       int i = 0;
 
       if(a == b && b == c && a % 2 == 0 ) {
       i = -1;
       } else {
       while(a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
           int A = a;
           int B = b;
           int C = c;
          
           a = B/2 + C/2;
           b = C/2 + A/2;
           c = A/2 + B/2;
           i++;
       }
       }
      Sysytem.out.println(i);
  }
}

Compiler output:
Main.java:27: error: package Sysytem does not exist
      Sysytem.out.println(i);
             ^
1 error
Language: Java

  import java.util.Scanner;
 
    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();
      
       int i = 0;
 
       if(a == b && b == c && a % 2 == 0 ) {
       i = -1;
       } else {
       while(a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
           int A = a;
           int B = b;
           int C = c;
          
           a = B/2 + C/2;
           b = C/2 + A/2;
           c = A/2 + B/2;
           i++;
       }
       }
      Sysytem.out.println(i);
  }
}

Compiler output:
Main.java:7: error: illegal character: '\u3000'
??int a = sc.nextInt();
^
Main.java:7: error: illegal character: '\u3000'
??int a = sc.nextInt();
 ^
2 errors
Language: Java

   import java.util.Scanner;
 
    class Main {
      public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
　　long a = sc.nextLong();
       long b = sc.nextLong();
       long c = sc.nextLong();
      
       long i = 0;
 
       while(a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
           a = b/2 + c/2;
           b = c/2 + a/2;
           c = a/2 + b/2;
           i++;om
       }
      Sysytem.out.println(i);
  }
}

Compiler output:
Main.java:7: error: illegal character: '\u3000'
??long a = sc.nextLong();
^
Main.java:7: error: illegal character: '\u3000'
??long a = sc.nextLong();
 ^
Main.java:17: error: not a statement
           i++;om
               ^
Main.java:17: error: ';' expected
           i++;om
                 ^
4 errors
Language: Java

    import java.util.Scanner;
 
    class Main {
      public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
　　double a = sc.nextDouble();
       double b = sc.nextDouble();
       double c = sc.nextDouble();
      
       double i = 0;
 
       while(a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
           a = b/2 + c/2;
           b = c/2 + a/2;
           c = a/2 + b/2;
           i++;
       }
      Sysytem.out.println(i);
  }
}

Compiler output:
Main.java:7: error: illegal character: '\u3000'
??double a = sc.nextDouble();
^
Main.java:7: error: illegal character: '\u3000'
??double a = sc.nextDouble();
 ^
2 errors
Language: Java

    import java.util.Scanner;
 
    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();
      
       int i = 0;
 
       while(a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
           a = b/2 + c/2;
           b = c/2 + a/2;
           c = a/2 + b/2;
           i++;
       }
      Sysytem.out.println(i);
  }

Compiler output:
Main.java:7: error: illegal character: '\u3000'
??int a = sc.nextInt();
^
Main.java:7: error: illegal character: '\u3000'
??int a = sc.nextInt();
 ^
Main.java:20: error: reached end of file while parsing
  }
   ^
3 errors
Language: Java

    import java.util.Scanner;
 
    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();
      
       int i = 0;
 
       while(a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
           a == b/2 + c/2;
           b == c/2 + a/2;
           c == a/2 + b/2;
           i++;
       }
      Sysytem.out.println(i);
  }
}
      

Compiler output:
Main.java:7: error: illegal character: '\u3000'
??int a = sc.nextInt();
^
Main.java:7: error: illegal character: '\u3000'
??int a = sc.nextInt();
 ^
Main.java:14: error: not a statement
           a == b/2 + c/2;
             ^
Main.java:15: error: not a statement
           b == c/2 + a/2;
             ^
Main.java:16: error: not a statement
           c == a/2 + b/2;
             ^
5 errors
Language: Java

    import java.util.Scanner;

    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();
      
       int i = 0;

       while(a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
           a == b/2 + c/2;
           b == c/2 + a/2;
           c == a/2 + b/2;
           i++;
       }
  }
}
       System.out.println(i);
       

Compiler output:
Main.java:7: error: illegal character: '\u3000'
??int a = sc.nextInt();
^
Main.java:7: error: illegal character: '\u3000'
??int a = sc.nextInt();
 ^
Main.java:14: error: not a statement
           a == b/2 + c/2;
             ^
Main.java:15: error: not a statement
           b == c/2 + a/2;
             ^
Main.java:16: error: not a statement
           c == a/2 + b/2;
             ^
Main.java:21: error: class, interface, enum, or record expected
       System.out.println(i);
       ^
6 errors
Language: C++

#include<cstdio>
int main()
{
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	if(a > b) a ^= b ^= a ^= b;
	if(b > c) b ^= c ^= b ^= c;
	if(a > b) a ^= b ^= a ^= b;
	int i;
	for(i = 0; i < 32; i ++)
		if((a & (1 << i) )||(b & (1 << i)) || (c & & (1 << i)))
			break;
	if((a == b || b == c) && i > 0)
		printf("-1");
	else
		printf("%d",i+1);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:65: error: lvalue required as unary '&' operand
   11 |                 if((a & (1 << i) )||(b & (1 << i)) || (c & & (1 << i)))
      |                                                              ~~~^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
    int a[]={}, b[]={}, c[]={};
    int counter;

    cin >> a[0]>>b[0]>>c[0];

    if(a[0]==b[0] && b[0]==c[0]){
        cout << -1;
        return 0;
    }

    while(1){
        int i;
        a[i+1]=(b[i]+c[i])/2;
        b[i+1]=(a[i]+c[i])/2;
        c[i+1]=(a[i]+b[i])/2;

        counter++;
        if(a[i+1]%2==1|b[i+1]%2==1|c[i+1]%2==1){
            cout<<counter<<endl;
            return 0;
        }

        if(counter>1000){
            return 0;
        }
}

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

include<iostream>
using namespace std;

int main(){
    int a[]={}, b[]={}, c[]={};
    int counter;

    cin >> a[0]>>b[0]>>c[0];

    if(a[0]==b[0] && b[0]==c[0]){
        cout << -1;
        return 0;
    }

    while(1){
        int i;
        a[i+1]=(b[i]+c[i])/2;
        b[i+1]=(a[i]+c[i])/2;
        c[i+1]=(a[i]+c[i])/2;

        counter++;
        if(a[i+1]%2==1|b[i+1]%2==1|c[i+1]%2==1){
            cout<<counter<<endl;
            return 0;
        }

        if(counter>1000){
            return 0;
        }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> a[0]>>b[0]>>c[0];
      |     ^~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout << -1;
      |         ^~~~
a.cc:23:13: error: 'cout' was not declared in this scope
   23 |             cout<<counter<<endl;
      |             ^~~~
a.cc:23:28: error: 'endl' was not declared in this scope
   23 |             cout<<counter<<endl;
      |                            ^~~~
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

int main(){
	int a[]={},b[]={},c[]={};
	int counter=0;
	cin >> a[0] >> b[0] >>c[0];

	if(a[0]==b[0]&&b[0]==c[0]){
		cout << -1<< endl;
		return 0;
	}

	while(1){
		int i=0;
		a[i+1]=(b[i]+c[i])/2;
		b[i+1]=(a[i]+c[i])/2;
		c[i+1]=(a[i]+b[i])/2;
		counter++;
		i++;
		if(a[i+1]%2==1|b[i+1]%2==1|c[i+1]%2==1){
			cout << counter<<endl;
			return 0;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> a[0] >> b[0] >>c[0];
      |         ^~~
a.cc:7:17: error: 'cout' was not declared in this scope
    7 |                 cout << -1<< endl;
      |                 ^~~~
a.cc:7:30: error: 'endl' was not declared in this scope
    7 |                 cout << -1<< endl;
      |                              ^~~~
a.cc:19:25: error: 'cout' was not declared in this scope
   19 |                         cout << counter<<endl;
      |                         ^~~~
a.cc:19:42: error: 'endl' was not declared in this scope
   19 |                         cout << counter<<endl;
      |                                          ^~~~
Language: Java

package agc014;

public class CookieExchanges {

	public static void main(String[] args) {
		int a = Integer.parseInt(args[0]);
		int b = Integer.parseInt(args[1]);
		int c = Integer.parseInt(args[2]);
		
		int nextA, nextB, nextC;
		nextA = nextB = nextC = 0;
		
		int times = 0;
		
		while(true){
			nextB += a / 2;
			nextC += a / 2;
			
			nextC += b / 2;
			nextA += b / 2;
			
			nextA += c / 2;
			nextB += c / 2;
			
			if(a % 2 != 0 || b % 2 != 0 || c % 2 != 0){
				break;
			}
			else if(nextA == nextB && nextB == nextC){
				times = -1;
				break;
			}
			
			a = nextA;
			b = nextB;
			c = nextC;
			
			nextA = nextB = nextC = 0;
			
			times++;
			
		}
		
		System.out.print(times);

	}

}


Compiler output:
Main.java:3: error: class CookieExchanges is public, should be declared in a file named CookieExchanges.java
public class CookieExchanges {
       ^
1 error
Language: C++

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

typedef unsigned long long LL;
const LL base = 1e10;
LL A[2][3];

int solve(){
	ST.clear();
    LL sum = A[0][0] + A[0][1] + A[0][2];
    int f = 0;
    LL v;
	for(int i=0; ;i++){
		sort(A[f], A[f]+3);
		v = A[f][0] * base + A[f][1];
		if(ST.count(v)){
			return -1;
		}
		ST.insert(v);
        for(int j=0; j<3; j++){
			if(A[f][j] & 1){
				return i;
			}
        }
        for(int i=0; i<3; i++){
			A[f^1][i] = (sum - A[f][i]) >> 1;
        }
        f ^= 1;
	}
}

int main(){
	while(~scanf("%llu %llu %llu", &A[0][0], &A[0][1], &A[0][2])){
        printf("%d\n", solve());
	}
	return 0;
}


Compiler output:
a.cc: In function 'int solve()':
a.cc:9:9: error: 'ST' was not declared in this scope
    9 |         ST.clear();
      |         ^~
Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Atcoder
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(CookieExchanges());
        }

        public static int CookieExchanges()
        {
            var inputs = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            int count = -1;
            int sum = inputs.Sum();

            if(inputs[0] == inputs[1] && inputs[0] == inputs[2] && inputs[0] % 2 == 0)
            {
                return count;
            }

            count = 0;

            while (!inputs.Any(x => x % 2 != 0))
            {
                inputs = inputs.Select(x => (sum - x) / 2).ToArray();
                count++;
            }

            return count;
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:11:26: error: 'string' has not been declared
   11 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
   11 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:16:15: error: expected ':' before 'static'
   16 |         public static int CookieExchanges()
      |               ^~~~~~~
      |               :
a.cc:37:6: error: expected ';' after class definition
   37 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void Atcoder::Program::Main(int*)':
a.cc:13:13: error: 'Console' was not declared in this scope
   13 |             Console.WriteLine(CookieExchanges());
      |             ^~~~~~~
a.cc: In static member function 'static int Atcoder::Program::CookieExchanges()':
a.cc:18:13: error: 'var' was not declared in this scope
   18 |             var inputs = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
      |             ^~~
a.cc:20:23: error: 'inputs' was not declared in this scope
   20 |             int sum = inputs.Sum();
      |                       ^~~~~~
a.cc:29:32: error: 'x' was not declared in this scope
   29 |             while (!inputs.Any(x => x % 2 != 0))
      |                                ^
a.cc:29:35: error: expected primary-expression before '>' token
   29 |             while (!inputs.Any(x => x % 2 != 0))
      |                                   ^
a.cc:31:43: error: expected primary-expression before '>' token
   31 |                 inputs = inputs.Select(x => (sum - x) / 2).ToArray();
      |                                           ^
Language: C++

/*AGC*/
#include<stdio.h>

int exchangesCount(int a,int b, int c){
    while(a%2==b%2==c%2==0){
        int as, bs, cs;
        as=(b+c)/2;
        bs=(c+a)/2;
        cs=(a+b)/2;
        i++;
        a=as;
        b=bs;
        c=cs;
        if(i>1000000)return -1;
    }
    return i;
}

int main(){
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    
    printf("%d\n",exchangesCount(a,b,c));
    return 0;
}

Compiler output:
a.cc: In function 'int exchangesCount(int, int, int)':
a.cc:10:9: error: 'i' was not declared in this scope
   10 |         i++;
      |         ^
a.cc:16:12: error: 'i' was not declared in this scope
   16 |     return i;
      |            ^
Language: C++

/*AGC*/
#include<stdio.h>

int exchangesCount(int a,int b, int c){
    while(a%2==b%2==c%2==0){
        as=(b+c)/2;
        bs=(c+a)/2;
        cs=(a+b)/2;
        i++;
        a=as;
        b=bs;
        c=cs;
        if(i>1000000)return -1;
    }
    return i;
}

int main(){
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    
    printf("%d\n",exchangesCount(a,b,c));
    return 0;
}

Compiler output:
a.cc: In function 'int exchangesCount(int, int, int)':
a.cc:6:9: error: 'as' was not declared in this scope; did you mean 'a'?
    6 |         as=(b+c)/2;
      |         ^~
      |         a
a.cc:7:9: error: 'bs' was not declared in this scope; did you mean 'b'?
    7 |         bs=(c+a)/2;
      |         ^~
      |         b
a.cc:8:9: error: 'cs' was not declared in this scope; did you mean 'c'?
    8 |         cs=(a+b)/2;
      |         ^~
      |         c
a.cc:9:9: error: 'i' was not declared in this scope
    9 |         i++;
      |         ^
a.cc:15:12: error: 'i' was not declared in this scope
   15 |     return i;
      |            ^
Language: C++

#include<cstdio>

int a, b, c, aNew, bNew, cNew;

int main()
{
    scanf("%d%d%d", &a, &b, &c);
    int n = 0;
    while(!(a&1) && !(b&1) && !(c&1))
    {
        n++;
        aNew = (b + c) >> 1; bNew = (a + c) >> 1;  cNew = (a + b) >> 1; 
        if(a == aNew && b == bNew && c == cNew)
        {
            printf("%d\n", -1);
            return 0;
        }
        a = aNew; b = bNew; c = cNew;
    }
    printf("%d\n", t);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:20: error: 't' was not declared in this scope
   20 |     printf("%d\n", t);
      |                    ^
Language: Java

public static void main(String[] args) {
    int val = 11;
    if (val == 10) {
      System.out.println("変数valは10です");
    } else {
      System.out.println("変数valは10ではありません");
    }   // 結果：変数valは10ではありません
  }

Compiler output:
Main.java:1: 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)
1 error
Language: C++

a , b , c = map(int , raw_input().split())
ans = 0
while not ((a & 1) | (b & 1) | (c & 1)):
	a , b , c = (b + c) >> 1 , (a + c) >> 1 , (a + b) >> 1
	ans += 1
	if ans > 1 << 15:
		ans = -1
		break
print ans

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a , b , c = map(int , raw_input().split())
      | ^
Language: C++

#include <iostream>

int main(){

    int a,b,c;
    int cnt=0;

    cin >> a >> b >> c;

    while(!a%2 || !b%2 || !c%2){
        cnt++;

        int _a = (b+c)/2;
        int _b = (a+c)/2;
        int _c = (a+b)/2;

        a=_a;b=_b;c=_c;

    }

    std::cout << cnt ;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |     cin >> a >> b >> c;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <vector>
#pragma warning(disable : 4996)
 
using namespace std;
 
#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define REP(i,n) FOR(i,0,n)
 
//最大公約数
long gcd(long a, long b){
	if (a%b==0){
		return b;
	}
	else{
		return gcd(b,a%b);
	}
}
 
//最小公倍数
long lcm(long a, long b){
	return (a*b) / gcd(a,b);
}
 
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 long long ll;
 
const ll INF = 1ll<<29;
const ll MOD = 1000000007;
const double EPS = 1e-10;
 
int main(){
	int a, b, c;
	
	cin >> a >> b >> c;
	
        if (a%2 || b%2 || c%2) cout << 0 << endl;
	 else if{
           if (a == b && b == c) cout << -1 << endl;
	   else {
		int ans = 0;
		int t1 = a, t2 = b, t3 = c;
		
		while(t1%2 == 0 && t2%2 == 0 && t3%2 == 0){
			ans++;
			a = t2/2 + t3/2;
			b = t1/2 + t3/2;
			c = t1/2 + t2/2;
			
			t1 = a;
			t2 = b;
			t3 = c;
		}
		cout << ans << endl;
	  }
        }
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:17: error: expected '(' before '{' token
   45 |          else if{
      |                 ^
      |                 (
Language: C++

#include <iostream>

using namespace std;

int A,B,C;
int ans;
int main() {
  cin >> A >> B >> C;

  if(A == B && B == C && (C % 2 == 0)) {cout << "-1" <<endl; return 0;}

  while((A % 2 == 0) && (B % 2 == 0) && (C % 2 == 0)) {
    int tmp = A / 2;
    int tmp2 = B / 2;
    int tmp3 = C / 2;
    A = tmp2 + tmp3;
    B = tmp + tmp3;
    C = tmp + tmp2;
    ans++;
  }

  cout << ans << endl;
}
  
  
#include <iostream>

using namespace std;

int A,B,C;
int ans;
int main() {
  cin >> A >> B >> C;

  if(A == B && B == C && (C % 2 == 0)) {cout << "-1" <<endl; return 0;}

  while((A % 2 == 0) && (B % 2 == 0) && (C % 2 == 0)) {
    int tmp = A / 2;
    int tmp2 = B / 2;
    int tmp3 = C / 2;
    A = tmp2 + tmp3;
    B = tmp + tmp3;
    C = tmp + tmp2;
    ans++;
  }

  cout << ans << endl;
}
  
  


Compiler output:
a.cc:30:5: error: redefinition of 'int A'
   30 | int A,B,C;
      |     ^
a.cc:5:5: note: 'int A' previously declared here
    5 | int A,B,C;
      |     ^
a.cc:30:7: error: redefinition of 'int B'
   30 | int A,B,C;
      |       ^
a.cc:5:7: note: 'int B' previously declared here
    5 | int A,B,C;
      |       ^
a.cc:30:9: error: redefinition of 'int C'
   30 | int A,B,C;
      |         ^
a.cc:5:9: note: 'int C' previously declared here
    5 | int A,B,C;
      |         ^
a.cc:31:5: error: redefinition of 'int ans'
   31 | int ans;
      |     ^~~
a.cc:6:5: note: 'int ans' previously declared here
    6 | int ans;
      |     ^~~
a.cc:32:5: error: redefinition of 'int main()'
   32 | int main() {
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main() {
      |     ^~~~
Language: Java

import java.util.Scanner;

public class Main{
     public static void main(String[] args){
Scanner scan= new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
int count=0;

if(a==b && b==c){
 if(a%2==1 && b%2==0 && c%2==0)) count=-1;
}else{
while(a%2==0 && b%2==0 && c%2==0){
int a1=a;
int b1=b;
int c1=c;

a = c1/2 + b1/2;
b = a1/2 + c1/2;
c = a1/2 + b1/2;

count++;
}
}
System.out.println(count);

     }
}

Compiler output:
Main.java:12: error: illegal start of expression
 if(a%2==1 && b%2==0 && c%2==0)) count=-1;
                               ^
1 error
Language: C++

#include<iostream>    
#include<cstdio>  
#include<stdio.h>  
#include<cstring>    
#include<cstdio>    
#include<climits>    
#include<cmath>   
#include<vector>  
#include <bitset>  
#include<algorithm>    
#include <queue>  
#include<map> 
#define inf 9999999; 
using namespace std;

/*start:2017/5/6 15:38*/
/*end:2017/5/6 16:56*/

long long int x, y, z, ans, sum, k;
int i;

int main()
{
	cin >> x >> y >> z;
	k = abs(x - y);
	s = abs(y - z);
	sum = 0;
	while (k%2==0&&s%2==0)
	{
		sum++;
		k /= 2;
		s /= 2;
	}
	cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: error: 's' was not declared in this scope
   26 |         s = abs(y - z);
      |         ^
Language: C++

//In the Name of God
//Let Our Voices Echo
#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
#define X real()
#define Y imag()
typedef long long ll;
typedef double ld; 
typedef complex<ld> point;
const ld eps=1e-9;
const int MAX=1e5+9,MOD=1e9+7;
int n,d[MAX];
vector<int> g[MAX];
queue<int> q;
int main()
{
	ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
	memset(d,-1,sizeof d);
	cin>>n;
	if (n==2) return cout<<"Second",0;
	for (int i=1,v,u;i<n;i++)
	{	
		cin>>v>>u,v--,u--,g[v].push_back(u),g[u].push_back(v);
	}	
	for (int i=0;i<n;i++) 
		if (g[i].size()==1)
			q.push(i),d[i]=0;
	while (q.size())
	{
		int v=q.front();
		q.pop();
		for (auto u:g[v]) 
			if (d[u]==-1)
				d[u]=d[v]+1,q.push(u);
	}
	int mx=*max_element(d,d+n),cnt=0;
	for (int i=0;i<n;i++) if (d[i]==mx) cnt++;
	if (cnt==1) return cout<<"First",0;
	for (int i=0;i<n;i++)
	{
		int cnt=0;
		for (auto u:g[i])
			if (d[u]==d[i]-1) 
				cnt++;
		if (cnt>1) return cout<<"First",0; 
	}
	if (mx%2==1) return cout<<"Second",0;
	cout<<"Second"<<Endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:25: error: 'Endl' was not declared in this scope
   49 |         cout<<"Second"<<Endl;
      |                         ^~~~
Language: C++

#include <stdio.h>

int main()
{   int a,b,c,ans;
    scanf("%d%d%d",&a,&b,&c);
    for(int i=1;;i++){
        int q=a/2;
        int w=b/2;
        int e=c/2;
        if(a==b&&b==c&&a!=0&&a%2==0){
        ans=-1;
        break;

        }
         if((a%2!=0&&b%2!=0)||(a%2!=0&&c%2!=0)||(c%2!=0&&b%2!=0)){
        ans=0;
        break;

        }

        if(i>2000){

          ans=-1;
            break;

        }
        if((q+w)%2!=0){
            ans=i;
            break;
        }
        if((q+e)%2!=0){
            ans=i;
            break;
        }


    if((w+e)%2!=0){
            ans=i;
            break;
        }
        a=e+w;
        b=q+e;
        c=q+w;

#include <stdio.h>

int main()
{   int a,b,c,ans;
    scanf("%d%d%d",&a,&b,&c);
    for(int i=1;;i++){
        int q=a/2;
        int w=b/2;
        int e=c/2;
        if(a==b&&b==c&&a!=0&&a%2==0){
        ans=-1;
        break;

        }
         if((a%2!=0&&b%2!=0)||(a%2!=0&&c%2!=0)||(c%2!=0&&b%2!=0)){
        ans=0;
        break;

        }

        if(i>2000){

          ans=-1;
            break;

        }
        if((q+w)%2!=0){
            ans=i;
            break;
        }
        if((q+e)%2!=0){
            ans=i;
            break;
        }


    if((w+e)%2!=0){
            ans=i;
            break;
        }
        a=e+w;
        b=q+e;
        c=q+w;


        }
        printf("%d",ans);

    return 0;
}
#include <stdio.h>

int main()
{   int a,b,c,ans;
    scanf("%d%d%d",&a,&b,&c);
    for(int i=1;;i++){
        int q=a/2;
        int w=b/2;
        int e=c/2;
        if(a==b&&b==c&&a!=0&&a%2==0){
        ans=-1;
        break;

        }
         if((a%2!=0&&b%2!=0)||(a%2!=0&&c%2!=0)||(c%2!=0&&b%2!=0)){
        ans=0;
        break;

        }

        if(i>2000){

          ans=-1;
            break;

        }
        if((q+w)%2!=0){
            ans=i;
            break;
        }
        if((q+e)%2!=0){
            ans=i;
            break;
        }


    if((w+e)%2!=0){
            ans=i;
            break;
        }
        a=e+w;
        b=q+e;
        c=q+w;


        }
        printf("%d",ans);

    return 0;
}

        }
        printf("%d",ans);

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   47 | int main()
      |         ^~
a.cc:47:9: note: remove parentheses to default-initialize a variable
   47 | int main()
      |         ^~
      |         --
a.cc:47:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:48:1: error: a function-definition is not allowed here before '{' token
   48 | {   int a,b,c,ans;
      | ^
a.cc:97:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   97 | int main()
      |         ^~
a.cc:97:9: note: remove parentheses to default-initialize a variable
   97 | int main()
      |         ^~
      |         --
a.cc:97:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:98:1: error: a function-definition is not allowed here before '{' token
   98 | {   int a,b,c,ans;
      | ^
Language: C++

using namespace std;
int main(){
	int a,b,c,result=0;
	while(cin>>a>>b>>c)
	{
		while(a%2 == 0 && b%2 == 0 && c%2==0 && a!=b && b!=c)
		{	
			result++;
			int temp=a;
			a=(b+c)/2; 
			int temp2=b;
			b=(temp+c)/2;
			c=(temp+temp2)/2;
		}
		if(result==0) result=-1; 
		cout<<result<<endl;
	}
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: 'cin' was not declared in this scope
    4 |         while(cin>>a>>b>>c)
      |               ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:16:17: error: 'cout' was not declared in this scope
   16 |                 cout<<result<<endl;
      |                 ^~~~
a.cc:16:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:31: error: 'endl' was not declared in this scope
   16 |                 cout<<result<<endl;
      |                               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

//satyaki3794
#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define MOD (1000000007LL)
#define LEFT(n) (2*(n))
#define RIGHT(n) (2*(n)+1)
 
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef pair<ii, int> iii;

ll pwr(ll base, ll p, ll mod){
ll ans = 1;while(p){if(p&1)ans=(ans*base)%mod;base=(base*base)%mod;p/=2;}return ans;
}
 

ll gcd(ll a, ll b){
    if(b == 0)  return a;
    return gcd(b, a%b);
}


int n, color[100005];
set<int> adj[100005], orig[100005];
bool removed[100005];


int main(){

    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin>>n;
    if(n == 1){
    	cout<<"First";
    	return 0;
    }


    int e = n-1;
    while(e--){

    	int a, b;
    	cin>>a>>b;
    	adj[a].insert(b);
    	adj[b].insert(a);

    	orig[a].insert(b);
    	orig[b].insert(a);
    }

    priority_queue<ii> pq;
    for(int i=1;i<=n;i++){
    	pq.push(ii(-(int)adj[i].size(), i));
    	color[i] = -1;
    }

    while(!pq.empty()){

    	int v = pq.top().ss;
    	int deg = -pq.top().ff;
    	pq.pop();

// cout<<"popped "<<v<<" "<<deg<<endl;

    	if(deg != (int)adj[v].size()){
    		pq.push(ii(-(int)adj[v].size(), v));
    		continue;
    	}

    	if(color[v] != -1){

    		for(auto it : adj[vv])
    			adj[it].erase(vv);
    		continue;
    	}

// cout<<"retained "<<v<<" "<<deg<<endl;

    	if(deg == 0){
    		color[v] = 0;
    		continue;
    	}

    	if(deg == 1){
    		int vv = (*adj[v].begin());
    		color[vv] = 0;
    		color[v] = 1;
    		for(auto it : adj[vv])
    			adj[it].erase(vv);
    		adj[v].clear();
    		adj[vv].clear();
    		continue;
    	}

    	assert(0);
    }

// for(int i=1;i<=n;i++)	cout<<color[i]<<" ";cout<<endl;

    for(int i=1;i<=n;i++)
    	if(color[i] == 1)
    		for(auto vv : orig[i])
    			color[vv] = 1;

    for(int i=1;i<=n;i++)
    	if(color[i] == 0){
    		cout<<"First";
    		return 0;
    	}

    cout<<"Second";
    return 0;
}










Compiler output:
a.cc: In function 'int main()':
a.cc:76:35: error: 'vv' was not declared in this scope; did you mean 'v'?
   76 |                 for(auto it : adj[vv])
      |                                   ^~
      |                                   v
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
       int a,b,c,m,n,flag=0;
      cin>>a>>b>>c;
      while(a%2==0 && b%2==0 && c%2==0){
      m=a;
      n=b
      a=c/2+b/2;
      b=c/2+m/2;
      c=n/2+m/2;
      flag++;
}
cout<<flag;

}

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

#include<stdio.h>
#include<stdlib.h>
int main()
{
	long long int a,b,c;
	long long int x,y,z;
	scanf("%lld %lld %lld",&a,&b,&c);
	long long int flag = 0;
	for(1)
	{
		x=a;
		y=b;
		z=c;
		a= y/2 + z/2;
		b = x/2 + z/2;
		c = x/2 + y/2;
		flag ++;
		if(a%2==1 && b%2 == 1 && c%2 ==1)
			break;
	}
	printf("%lld",flag);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: expected ';' before ')' token
    9 |         for(1)
      |              ^
      |              ;
main.c:9:14: error: expected expression before ')' token
Language: C++

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int A,B,C,i,a,b,c;
	cin>>A>>B>>C;
	for ( i=0; i++;);
	int a[0]=A;
	b[0]=B;
	c[0]=C;
	a[i]=a[i-1]/2;
	b[i]=b[i-1]/2;
	c[i]=c[i-1]/2;
	if (a[i]%2!=0||b[i]%2!=0||c[i]%2!=0)cout<<"i"<<endl;
	else cout<<"-1"<<endl;
	
	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: conflicting declaration 'int a [0]'
    9 |         int a[0]=A;
      |             ^
a.cc:6:21: note: previous declaration as 'int a'
    6 |         int A,B,C,i,a,b,c;
      |                     ^
a.cc:10:10: error: invalid types 'int[int]' for array subscript
   10 |         b[0]=B;
      |          ^
a.cc:11:10: error: invalid types 'int[int]' for array subscript
   11 |         c[0]=C;
      |          ^
a.cc:12:10: error: invalid types 'int[int]' for array subscript
   12 |         a[i]=a[i-1]/2;
      |          ^
a.cc:12:15: error: invalid types 'int[int]' for array subscript
   12 |         a[i]=a[i-1]/2;
      |               ^
a.cc:13:10: error: invalid types 'int[int]' for array subscript
   13 |         b[i]=b[i-1]/2;
      |          ^
a.cc:13:15: error: invalid types 'int[int]' for array subscript
   13 |         b[i]=b[i-1]/2;
      |               ^
a.cc:14:10: error: invalid types 'int[int]' for array subscript
   14 |         c[i]=c[i-1]/2;
      |          ^
a.cc:14:15: error: invalid types 'int[int]' for array subscript
   14 |         c[i]=c[i-1]/2;
      |               ^
a.cc:15:14: error: invalid types 'int[int]' for array subscript
   15 |         if (a[i]%2!=0||b[i]%2!=0||c[i]%2!=0)cout<<"i"<<endl;
      |              ^
a.cc:15:25: error: invalid types 'int[int]' for array subscript
   15 |         if (a[i]%2!=0||b[i]%2!=0||c[i]%2!=0)cout<<"i"<<endl;
      |                         ^
a.cc:15:36: error: invalid types 'int[int]' for array subscript
   15 |         if (a[i]%2!=0||b[i]%2!=0||c[i]%2!=0)cout<<"i"<<endl;
      |                                    ^
Language: C++

#include <stdio.h>

int main()
{   int a,b,c,ans;
    scanf("%d%d%d",&a,&b,&c);
    for(int i=1;;i++){
        int q=a/2;
        int w=b/2;
        int e=c/2;
        if(a==b&&b==c||q=0||w=0||e=0){
        ans=-1;
        break;

        }
        if(i>20000){
          ans=-1;
            break;

        }
        if((q+w)%2!=0){
            ans=i;
            break;
        }
        if((q+e)%2!=0){
            ans=i;
            break;
        }


    if((w+e)%2!=0){
            ans=i;
            break;
        }
        a=e+w;
        b=q+e;
        c=q+w;


        }
        printf("%d",ans);

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:32: error: lvalue required as left operand of assignment
   10 |         if(a==b&&b==c||q=0||w=0||e=0){
      |                               ~^~~
Language: C++

def sort(n1, n2, n3):
	n=[n1, n2, n3]
	t=len(n)
	for i in range(t-1):
		for j in range(i+1, t):
			if n[i] > n[j]:
				n[i],n[j] = n[j],n[i]
	return n

if __name__ == '__main__':
	A, B, C=map(int, input().split())
	N=0
	arr=[]
	flag=1
	if(A%2==1 or B%2==1 or C%2==1):
		flag=0

	while(flag):
		A, B, C = sort(A,B,C)
		arr.append([A,B,C])
		sum = A+B+C
		A=(sum-A)/2
		B=(sum-B)/2
		C=(sum-C)/2
		N+=1
		if(A%2==1 or B%2==1 or C%2==1):
			flag=0
		for i in range(len(arr)-1):
			if(arr[i] == [A,B,C]):
				flag = 0
				N=-1
	print(N)

Compiler output:
a.cc:10:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   10 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def sort(n1, n2, n3):
      | ^~~
Language: C

#include<stdio.h>

int separate(int,int,int);

int main(){

int a,b,c;

scanf("%d %d %d",&a,&b,&c);
printf("%d",separate(a,b,c));

return 0;

} 


int separate(int a,int b,int c){

int i;
int a2,b2,c2;
const int MAX = 1000000000;

for(i = 1 ,i<=MAX; i++){

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


if(a % 2 != 0 && b % 2 != 0 && c % 2 != 0) return i;



}

return -1;


}

Compiler output:
main.c: In function 'separate':
main.c:23:23: error: expected ';' before ')' token
   23 | for(i = 1 ,i<=MAX; i++){
      |                       ^
      |                       ;
Language: C

#include<stadio.h>

int separate(int,int,int);

int main(){

int a,b,c;

scanf("%d %d %d",&a,&b,&c);
printf("%d",separate(a,b,c));

return 0;

} 


int separate(int a,int b,int c){

int i;
int a2,b2,c2;
const double MAX = 1000000000;

for(i = 1 ,i<=MAX; i++){

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


if(a % 2 != 0 && b % 2 != 0 && c % 2 != 0) return i;



}

return -1;


}

Compiler output:
main.c:1:9: fatal error: stadio.h: No such file or directory
    1 | #include<stadio.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stadio.h>

int separate(int,int,int);

int main(){

int a,b,c;

scanf("%d %d %d",&a,&b,&c);
printf("%d",separate(a,b,c));

return 0;

} 


int separate(int a,int b,int c){

int i;
int a2,b2,c2;
const int MAX = 1000000000;

for(i = 1 ,i<=MAX; i++){

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


if(a % 2 != 0 && b % 2 != 0 && c % 2 != 0) return i;



}

return -1;


}

Compiler output:
main.c:1:9: fatal error: stadio.h: No such file or directory
    1 | #include<stadio.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include <cstdio>
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <stack>
#include <functional>
#include <set>
#include <map>
#include <deque>
#define WMAX 10000
#define HMAX 100000007

//コメントアウトするとdebug()を実行しない
#define DEBUG

using namespace std;
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

typedef long long ll;

ll A,B,C,a,b,c,N,W,H,ans = 0,dp[HMAX][WMAX];
string S;
static const ll dx[8] = {0,1,1,1,0,-1,-1,-1},
					dy[8] = {1,1,0,-1,-1,-1,0,1};

void solve(){
	a = A;
	b = B;
	c = C;
	while(true){
		ll i,j,k;
		if ((a+b)%2 || (b+c)%2 || (c+a)%2)
		{
			break;
		}
		i = (b+c)/2;
		j = (c+a)/2;
		k = (a+b)/2;
		a = i;
		b = j;
		c = k;
		ans++;
		if((A == a) && (B == b) && (C == c)){
			ans = -1;
			break;
		}
		if(ans > HMAX){
			ans = -1;
			break;
		}
	}
}

void debug(){

}

void answer(){
	cout << ans << "\n";
}

int main(){
	cin >> A >> B >> C;
	solve();
	#ifdef DEBUG
	debug();
	#endif
	answer();

	return 0;
}

Compiler output:
/tmp/cc8txrjM.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x225): relocation truncated to fit: R_X86_64_PC32 against symbol `S[abi:cxx11]' defined in .bss section in /tmp/cc8txrjM.o
a.cc:(.text+0x23e): relocation truncated to fit: R_X86_64_PC32 against symbol `S[abi:cxx11]' defined in .bss section in /tmp/cc8txrjM.o
collect2: error: ld returned 1 exit status
Language: C++

#include <stdio.h>
#include <algorithm>

int main() {
	int A, B, C;
	scanf("%d %d %d", &A, &B, &C);
	int time = 0;
	while ((A % 2 == 0 && B % 2 == 0 && C % 2 == 0) && !(A == B && B == C && C == A)) {
		time++;
		int TA = (B + C) / 2;
		int TB = (A + C) / 2;
		int TC = (A + B) / 2;
		A = TA;
		B = TB;
		C = TC;
	}
	if (A == B && B == C && C == A && A % 2 == 0) {
		printf("%d\n", -1);
	printf("%d\n",time);
}

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

int a,b,c;
    cin >> a >> b >> c;
    if (!(a%2==0 && b%2 ==0 && c%2==0)) {
        cout << "0" << endl;
        return 0;
    }
    int cnt = 0;
    if (a%4 != 0)
        ++cnt;
    if (b%4 != 0)
        ++cnt;
    if (c%4!= 0)
        ++cnt;
    if (cnt == 3) {
        cout << "-1" << endl;
        return 0;
    }
    if (cnt == 1 || cnt == 2){
        cout << 1 << endl;
        return 0;
    }
    cout << "3" << endl;

Compiler output:
a.cc:2:5: error: 'cin' does not name a type
    2 |     cin >> a >> b >> c;
      |     ^~~
a.cc:3:5: error: expected unqualified-id before 'if'
    3 |     if (!(a%2==0 && b%2 ==0 && c%2==0)) {
      |     ^~
a.cc:8:5: error: expected unqualified-id before 'if'
    8 |     if (a%4 != 0)
      |     ^~
a.cc:10:5: error: expected unqualified-id before 'if'
   10 |     if (b%4 != 0)
      |     ^~
a.cc:12:5: error: expected unqualified-id before 'if'
   12 |     if (c%4!= 0)
      |     ^~
a.cc:14:5: error: expected unqualified-id before 'if'
   14 |     if (cnt == 3) {
      |     ^~
a.cc:18:5: error: expected unqualified-id before 'if'
   18 |     if (cnt == 1 || cnt == 2){
      |     ^~
a.cc:22:5: error: 'cout' does not name a type
   22 |     cout << "3" << endl;
      |     ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<sstream>
#include<string>
#include<iomanip>
#include<algorithm>
using namespace std;

int main() {
	int A,B,C;
	cin >> A >> B >> C;
	int count = 0;
	int Ablock[3] = {};
	int	Bblock[3] = {};
	int Cblock[3] = {};
	Ablock[0] = A; Bblock[0] = B; Cblock[0] = C;
	while(1){
			if (A == B && B == C){
				count = -1;
				break;
			}
			else if (count > 2 && (Ablock[count % 3] = A && Bblock[count % 3] = B && Cblock[count % 3] = C)) {
				count = -1;
				break;
			}
			else if (A % 2 == 1 || B % 2 == 1 || C % 2 == 1) {
				break;
			}
			else{
				int A_alt = A;
				int B_alt = B;
				int C_alt = C;
				A = B_alt / 2 + C_alt / 2;
				B = A_alt / 2 + C_alt / 2;
				C = B_alt / 2 + A_alt / 2;
				count++;
			}
	}
	cout << count << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:95: error: lvalue required as left operand of assignment
   22 |                         else if (count > 2 && (Ablock[count % 3] = A && Bblock[count % 3] = B && Cblock[count % 3] = C)) {
      |                                                                                             ~~^~~~~~~~~~~~~~~~~~~~
Language: C++

int main()
{
	int a, b, c;
	cin >> a >> b >> c;
        cout << -1 << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> a >> b >> c;
      |         ^~~
a.cc:5:9: error: 'cout' was not declared in this scope
    5 |         cout << -1 << endl;
      |         ^~~~
a.cc:5:23: error: 'endl' was not declared in this scope
    5 |         cout << -1 << endl;
      |                       ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <numeric>
#include <cmath>

using namespace std;

typedef long long int lld;

const lld mod = 1e9+7;
const lld INF = 1e9;
const lld MAXN = 1e9;

int main()
{
	lld a,b,c;
	cin >> a >>b >> c;

	if (a%2==1 || b%2== 1 || c%2==1)
		{
			cout << cnt << endl;
			return 0;
		}

	if (a==b && b==c)
	{
		cout << -1 << endl;
	}else
	{
		lld cnt = 0;

		while(1)
		{
			cnt++;
			lld x=b+c,y=c+a,z=a+b;
			a = x / 2;
			b = y / 2;
			c = z / 2;

			if (a%2==1 || b%2== 1 || c%2==1)
			{
				cout << cnt << endl;
				break;
			}
			if (a == b && b == c)
			{
				cout << -1 << endl;
				break;
			}
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:33: error: 'cnt' was not declared in this scope; did you mean 'int'?
   26 |                         cout << cnt << endl;
      |                                 ^~~
      |                                 int
Language: Java

import java.util.Scanner;

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

int count=0;
if(a==b && b==c){
System.out.println("-1");
}else{
while(a%2==0 && b%2==0 && c%2==0){
int a1=a;
int b1=b;
int c1=c;

a = c1/2 + b1/2;
b = a1/2 + c1/2;
c = a1/2 + b1/2;

count++;
}
System.out.println(count);
}

     }
}

Compiler output:
Main.java:3: error: class a is public, should be declared in a file named a.java
public class a{
       ^
1 error
Language: Java

import java.util.Scanner;
/**
 * Created by zzt on 17-5-6.
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int curA = scanner.nextInt();
        int curB = scanner.nextInt();
        int curC = scanner.nextInt();
        int time = 0;

        if (curA == curB && curA == curC && curA % 2 == 0) {
            System.out.println(-1);
            return;
        }
        int tempA = 0, tempB = 0, tempC = 0;
        while (curA % 2 == 0 && curB % 2 == 0 % && curC % 2 == 0) {
            tempA = curB / 2 + curC / 2;
            tempB = curA / 2 + curC / 2;
            tempC = curA / 2 + curB / 2;
            curA = tempA;
            curB = tempB;
            curC = tempC;
            time++;
        }
        System.out.println(time);
    }
}

Compiler output:
Main.java:18: error: illegal start of expression
        while (curA % 2 == 0 && curB % 2 == 0 % && curC % 2 == 0) {
                                                ^
1 error
Language: Java

/**
 * Created by zzt on 17-5-6.
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int curA = scanner.nextInt();
        int curB = scanner.nextInt();
        int curC = scanner.nextInt();
        int time = 0;

        if (curA == curB && curA == curC && curA % 2 == 0) {
            System.out.println(-1);
            return;
        }
        int tempA = 0, tempB = 0, tempC = 0;
        while (curA % 2 == 0 && curB % 2 == 0 % && curC % 2 == 0) {
            tempA = curB / 2 + curC / 2;
            tempB = curA / 2 + curC / 2;
            tempC = curA / 2 + curB / 2;
            curA = tempA;
            curB = tempB;
            curC = tempC;
            time++;
        }
        System.out.println(time);
    }
}

Compiler output:
Main.java:17: error: illegal start of expression
        while (curA % 2 == 0 && curB % 2 == 0 % && curC % 2 == 0) {
                                                ^
1 error
Language: C++


#include <bits/stdc++.h>
#define MAX 1000005
#define ll long long
#define upperlimit 1000100
#define INF 1e18
#define eps 1e-8
#define endl '\n'
#define pcc pair<char,char>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define tr(container,it) for(typeof(container.begin()) it=container.begin();it!=container.end();it++)
#define MOD 1000000007
#define slld(t) scanf("%lld",&t)
#define sd(t) scanf("%d",&t)
#define pd(t) printf("%d\n",t)
#define plld(t) printf("%lld\n",t)
#define mp(a,b) make_pair(a,b)
#define FF first
#define SS second
#define pb(x) push_back(x)
#define vi vector<int>
#define clr(a) memset(a,0,sizeof(a))
#define debug(a) printf("check%d\n",a)
#define csl ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    if(a==b&&a==c)
    {
        cout<<"-1"<<endl;
        return 0;
    }
    while(a%2==0||b%2==0||c%2==0)
    {
        
        int p=b/2+c/2;
        int d=a/2+c/2;
        int l=a/2+b/2;
        a=p;b=d;c=l;
        ans++;
    }
    cout<<ans<<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   43 |         ans++;
      |         ^~~
      |         abs
a.cc:45:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   45 |     cout<<ans<<endl;
      |           ^~~
      |           abs