criyle/codenet-compile-errors huggingface dataset:
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();
    cookieExchange(a,b,c);
  }
  
  public void cookieExchange(int a, int b, int c){
        int steps = 1;
        int d = a, e = b, f = c;
        int newA = (b/2)+(c/2);
        int newC = (b/2)+(a/2);
        int newB = (a/2)+(c/2);
        a=newA;
        b=newB;
        c=newC;
        while(a%2 ==0&& c%2 ==0&& b%2 ==0){
            newA = (b/2)+(c/2);
            newC = (b/2)+(a/2);
            newB = (a/2)+(c/2);
            a=newA;
            b=newB;
            c=newC;
            if(a == d && b == e && c == f){
                steps = -1;
                break;
            }
            steps++;
        }
        System.out.println(steps);
    }
}

Compiler output:
Main.java:1: error: '{' expected
public class Main(){
                 ^
1 error
Language: Java

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();
    cookieExchange(a,b,c);
  }
  
  public void cookieExchange(int a, int b, int c){
        int steps = 1;
        int d = a, e = b, f = c;
        int newA = (b/2)+(c/2);
        int newC = (b/2)+(a/2);
        int newB = (a/2)+(c/2);
        a=newA;
        b=newB;
        c=newC;
        while(a%2 ==0&& c%2 ==0&& b%2 ==0){
            newA = (b/2)+(c/2);
            newC = (b/2)+(a/2);
            newB = (a/2)+(c/2);
            a=newA;
            b=newB;
            c=newC;
            if(a == d && b == e && c == f){
                steps = -1;
                break;
            }
            steps++;
        }
        System.out.println(steps);
    }
}

Compiler output:
Main.java:1: error: '{' expected
class Main(){
          ^
1 error
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bitset>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<iomanip>
using namespace std;

#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repr(i, 0, n)
#define INF 2e9
#define MOD 1000000007
#define LINF (long long)4e18

using ll = long long;
using Pi = pair<int,int>;
using Pl = pair<ll,ll>;


int main(){
  int A,B,C; cin >> A >> B >> C;
  if(A == B && B == C && !A&1 && !b&1 && !c&1){
    cout << -1 << endl;
    return 0;
  }
  int ans = 0;
  rep(i,100000000){
    if(A&1 | B&1 | C&1) break;
    int a = A,b = B,c = C;
    A = (b+c)/2;
    B = (c+a)/2;
    C = (a+b)/2;
    ans++;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:35: error: 'b' was not declared in this scope
   27 |   if(A == B && B == C && !A&1 && !b&1 && !c&1){
      |                                   ^
a.cc:27:43: error: 'c' was not declared in this scope
   27 |   if(A == B && B == C && !A&1 && !b&1 && !c&1){
      |                                           ^
Language: C++

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

int main(){
  int A,B,C,ans,a,b,c;
  cin>>A>>B>>C;
  ans=0;
  for(int i=0;i<101;i++){
    if(A%2==1||B%2==1||C%2==!){
      cout<<ans<<endl;
      return 0;
    }
    else{
      a=B/2+C/2;
      b=A/2+C/2;
      c=A/2+B/2;
      ans++;
    }
    if(i==100){
      cout<<-1<<endl;
      return 0;
    }
  }
}

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

#include <bits/stdc++.h>
using namespace std;
#define MD 1000000007
typedef long long int ll;
typedef pair<ll, ll> P;
template <typename T>
std::string tostr(const T &t){std::ostringstream os;os << t;return os.str();}
int dx[4]={1, 0, -1, 0}, dy[4]={0, 1, 0, -1};

int main(){
    ll a,b,c;
    cin>>a>>b>>c;
    if(a==b && b==c) cout<<-1<<endl;
    else{
        ll cnt=0;
        while(1){
            if(tmpa%2==1||tmpb%2==1||tmpc%2==1){
                cout<<cnt<<endl;
                break;
            }
            cnt++;
            ll tmpa=(b+c)/2,tmpb=(a+c)/2,tmpc=(a+b)/2;
            a=tmpa;
            b=tmpb;
            c=tmpc;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: 'tmpa' was not declared in this scope; did you mean 'tmpnam'?
   17 |             if(tmpa%2==1||tmpb%2==1||tmpc%2==1){
      |                ^~~~
      |                tmpnam
a.cc:17:27: error: 'tmpb' was not declared in this scope; did you mean 'tm'?
   17 |             if(tmpa%2==1||tmpb%2==1||tmpc%2==1){
      |                           ^~~~
      |                           tm
a.cc:17:38: error: 'tmpc' was not declared in this scope; did you mean 'tm'?
   17 |             if(tmpa%2==1||tmpb%2==1||tmpc%2==1){
      |                                      ^~~~
      |                                      tm
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected '}' before 'else'
   11 |     else{
      |     ^~~~
a.cc:8:19: note: to match this '{'
    8 |     if(A==B&&B==C){
      |                   ^
Language: C++

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

int main() {
  int A,B,C;
  cin >> A >> B >> C;
  B = abs(A-B);
  C = abs(A-C);
  
  if (B+C == 0 && A%2 == 0) {
    cout << -1 << endl;
    return 0;
  }
  if (B+C == 0) {
    cout << 0 << endl;
    return 0;
  }
  
  int ans = 0;
  for (;;) {
    if (P % 2 + Q % 2 > 0) {
      break;
    }
    ans++;
    P = P/2;
    Q = Q/2;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'P' was not declared in this scope
   21 |     if (P % 2 + Q % 2 > 0) {
      |         ^
a.cc:21:17: error: 'Q' was not declared in this scope
   21 |     if (P % 2 + Q % 2 > 0) {
      |                 ^
a.cc:25:5: error: 'P' was not declared in this scope
   25 |     P = P/2;
      |     ^
a.cc:26:5: error: 'Q' was not declared in this scope
   26 |     Q = Q/2;
      |     ^
Language: C

#include<stdio.h>
#include<math.h>

int judge(int x, int y, int z, int n){
    int cnt, rx, ry, rz;
    cnt = n;
    if (x%2==1 || y%2==1 || z%2==1){
        return cnt;
    }
    rx = y/2+z/2; ry = z/2+x/2; rz = x/2+y/2;
    cnt += 1;
    return judge(rx, ry, rz, cnt);
}

int main(){
    int a, b, c, ans;
    scanf("%d %d %d", &a, &b, &c);
    if (xa%2==1 || b%2==1 || c%2==1){
        printf("0");
        return 0;
    }
    if (a==b && b==c){
        printf("-1");
        return 0;
    }
    ans = judge(a, b, c, 0);
    
    printf("%d", ans);
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:9: error: 'xa' undeclared (first use in this function); did you mean 'a'?
   18 |     if (xa%2==1 || b%2==1 || c%2==1){
      |         ^~
      |         a
main.c:18:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<memory.h>

using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

int main(){
  ll a[3];
  cin >> a[0] >> a[1] >> a[2];
  sort(a,a+3,greater<int>());
  ll x=a[0]-a[2],y=a[1]-a[2];
  if(x==0 && y==0){
    if(a[0]%2==0 && a[1]%2==0 && a[2]%2==0)){
      cout << -1 << endl;
      return 0;
    }else{
      cout << 0 << endl;
      return 0;
    }
  }
  ll cnt=0;
  while(x%2==0 && y%2==0){
    ll nx=max(x,y)/2;
    ll ny=abs(x-y)/2;
    x=nx;
    y=ny;
    cnt++;
  }
  cout << cnt << endl;
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:44: error: expected primary-expression before ')' token
   32 |     if(a[0]%2==0 && a[1]%2==0 && a[2]%2==0)){
      |                                            ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<memory.h>

using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

int main(){
  ll a[3];
  cin >> a[0] >> a[1] >> a[2];
  sort(a,a+3,greater<int>());
  ll x=a[0]-a[2],y=a[1]-a[2];
  if(x==0 && y==0){
    cout << -1 << endl;
    return 0;
  }
  ll cnt=0;
  while(x%2==0 && y%2==0){
    ll nx=max(x,y);
    ll ny=abs(x-y)/2;
    x=nx;
    y=ny;
    cnt++;
  }
  cout << min(cnt2,cnt1) << endl;
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:15: error: 'cnt2' was not declared in this scope; did you mean 'cnt'?
   43 |   cout << min(cnt2,cnt1) << endl;
      |               ^~~~
      |               cnt
a.cc:43:20: error: 'cnt1' was not declared in this scope; did you mean 'cnt'?
   43 |   cout << min(cnt2,cnt1) << endl;
      |                    ^~~~
      |                    cnt
Language: C

#include <stdio.h>

int main(void){
	int a,b,c,a1=0,b1=0;c1=0;
	scanf("%d %d %d",&a,&b,&c);
	while(a%2!=0){
		a=a/2;
		a1++;
	}
	while(b%2!=0){
		b=b/2;
		b1++;
	}
	while(c%2!=0){
		c=c/2;
		c1++;
	}
	if(a1>b1){
		if(a1>c1){
			printf("%d\n", a1);
		}else{
			printf("%d\n",c1 );
		}
	}else{
		if(b1>c1){
			printf("%d\n",b1 );
		}else{
			printf("%d\n", c1);
		}
	}
}

Compiler output:
main.c: In function 'main':
main.c:4:29: error: 'c1' undeclared (first use in this function); did you mean 'b1'?
    4 |         int a,b,c,a1=0,b1=0;c1=0;
      |                             ^~
      |                             b1
main.c:4:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#pragma region _head

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<map>
#include<set>
#include<iomanip>
#include<queue>
#include<stack>
#include<numeric>
#include<utility>
#include<regex>

#pragma region _define

#define int LL
#define f(i,a,b) for(LL i=a;i<b;i++)
#define f_vI(v,n) f(i,0,n)cin>>v[i]
#define f_v2I(v1,v2,n) f(i,0,n)cin>>v1[i]>>v2[i]
#define f_v3I(v1,v2,v3,n) f(i,0,n)cin>>v1[i]>>v2[i]>>v3[i]
#define f_vO(v,n) f(i,0,n)cout<<v[i]<<endl
#define ei else if
#define all(a) a.begin(),a.end()
#define size(s) ((LL)s.size())
#define F first
#define S second
#define check() cout<<"! ! !"
#define endl "\n"
#define _y() cout<<"Yes"<<endl
#define _Y() cout<<"YES"<<endl
#define _n() cout<<"No"<<endl
#define _N() cout<<"NO"<<endl
#define int_INF 1<<29
#define ll_INF 1LL<<60
#define MOD 1000000007

#pragma endregion

#pragma region _using

using namespace std;

using LL = long long;
using st = string;
using vi = vector<LL>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vc = vector<char>;
using vs = vector<st>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvvb = vector<vvb>;
using qi = queue<LL>;
using qc = queue<char>;
using qs = queue<st>;
using si = stack<LL>;
using sc = stack<char>;
using ss = stack<st>;
using pi = pair<LL, LL>;
using mll = map<LL, LL>;
using vpi = vector<pi>;

#pragma endregion

#pragma region _graph

#define node 50  //グラフの最大位数　適宜変更
//bool graph[node][node]; bool visited[node] = { false };
#define link(a,b,m) f(i,0,m){cin>>a[i]>>b[i]; a[i]--; b[i]--; graph[a[i]][b[i]]=graph[b[i]][a[i]]=true;}

#pragma endregion


LL gcd(LL a, LL b) {
	LL r;
	while ((r = a % b) != 0) {
		a = b;
		b = r;
	}
	return b;
}
LL lcm(LL a, LL b) {
	return (a / gcd(a, b) * b);
}

//素数判定
bool is_prime(int n) {
	for (int i = 2; i*i <= n; i++) {
		if (n % i == 0) {
			return false;
		}
	}
	return true;
}

//階乗計算
LL factorial(LL n) {
	LL a = 1, ret = 1;
	while (a < n) {
		a++;
		ret *= a;
		ret %= MOD;
	}
	return ret;
}

#pragma endregion 



/*****************************************************************************/

signed main(void) {
	cin.tie(0); ios::sync_with_stdio(false);

	int a, b, c;
	cin >> a >> b >> c;
	int ans = 0;
	if (a == b && b == c) {
		cout << -1;
	}
	else {
		while (true) {
			if (a % 2 == 0 && b % 2 == 0 && c % 2 = 0) {
				int a1 = a / 2, b1 = b / 2, c1 = c / 2;
				a = a1 + b1;
				b = a1 + c1;
				c = a1 + b1;
				ans++;
			}
			else {
				cout << ans;
				return 0;
			}
		}
	}

	return 0;
}

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

/*
オーダー
10**6	余裕を持って間に合う	
10**7	おそらく間に合う	余裕を持って間に合う
10**8	非常にシンプルな処理でない限り厳しい	おそらく間に合う
10**9		非常にシンプルな処理でない限り厳しい
logn	:OK
n		:10^7
nlogn	:10^6
n**2	:10^4
n**3	:300
2**n	:20
n!		:10



// 各桁の和を計算する関数
int findSumOfDigits(int n) {
  int sum = 0;
  while (n > 0) { // n が 0 になるまで
    sum += n % 10;
    n /= 10;
  }
  return sum;
}

sort(a, a + N, greater<int>());  // a[0:N] を大きい順にソート

int num[110] = {0};  // バケット
for (int i = 0; i < N; ++i) {
    num[d[i]]++;  // d[i] が 1 個増える
}

map<string, int> mp; // 連想配列 map<キー型, 値型> オブジェクト名
for (int i = 0; i < N; ++i) {
    auto itr = mp.find(s[i]);        // s[i] が設定されているか？
    if(itr != mp.end() ) {
         mp[s[i]] += 1;
    }
    else {
         mp[s[i]] += 1 ;
    }
}
stack<int> s;	//intをデータとするスタックを用意
s.push(1);		//{} -> {1}
printf("%d\n", s.top());	// 3
s.pop();

queue<int> que;	//intをデータとするキューを用意
que.push(1);		//{} -> {1}
printf("%d\n", que.front());	// 1
que.pop();
*/

#include <iostream>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <bitset>
#include <string.h>

using namespace std;

// #define for(i,a,b) for (int i=(a);i<(b);++i)
typedef long long ll;
typedef pair<ll,ll> P;
#define REP(i,n) for(long long i = 0; i < (long long)(n); i++)
#define pb push_back // vectorに要素追加
#define INF (ll)1e18
// int 
// // 各桁の和を計算する関数
// int findSumOfDigits(int n) {
//   int amari = 0;
//   int keta = 0;
//   while (n > 0) { // n が 0 になるまで
//     amari += n % 2;
//     if (keta%2==0)
//     n /= 10;
//   }
//   return sum;
// }
 
ll gcd(ll a, ll b) {
	if(b == 0) return a;
	return gcd(b, a % b);
}

// const ll MAX_N = 1e5;
// ll N;
// ll h[MAX_N];
// ll dp[MAX_N+1]; // メモ化テーブル
 
// // i番目以降の品物から重さの総和がj以下になるように選ぶ
// void rec(ll i){
// 	if (i==0) dp[i] = 0;
// 	else if (i==1) dp[i] = abs(h[1]-h[0]);
// 	else dp[i] = min(dp[i-1]+abs(h[i]-h[i-1]), dp[i-2]+abs(h[i]-h[i-2]));
// 	return;
// }
 
 
int main() {
	// 入力
	ll A,B,C;cin>>A>>B>>C;
	
	// 解法
	ll ans = 0;
	while ((A!=B | B!=C) & (A%2+B%2+C%2==0)){
		ll a,b,c;
		a = B/2 + C/2;
		b = A/2 + C/2;
		c = B/2 + A/2;
		A=a;B=b;C=c;ans++;
	}
	else if (A==B & B==C & A%2==0) ans = -1;
	//出力
	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:120:9: error: 'else' without a previous 'if'
  120 |         else if (A==B & B==C & A%2==0) ans = -1;
      |         ^~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
typedef long long ll;
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#include<bits/stdc++.h>
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
typedef long long ll;
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define pb push_back
#define mp make_pair
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll INF = 1LL<<58;
 
int main(){
    ll A, B, C;
  	ll ans = 0;
  	cin >> A >> B >> C;
  	ll tempA = A;
  	ll tempB = B;
  	ll tempC = C;
  	if(A == B　&& A == C){
      cout << -1 << endl;
      return 0;
    }
  	ll temp;
  	ll temp2;
  	while(tempA % 2 == 0 && tempB % 2 == 0 && tempC % 2 == 0){
      temp = tempB / 2 + tempC / 2;
      temp2 = tempA / 2 + tempC / 2;
      tempC = tempA / 2 + tempB / 2;
      tempA = temp;
      tempB = temp2;
      ++ans;
    }
  	cout << ans << endl;
}

Compiler output:
a.cc:35:17: error: extended character 　 is not valid in an identifier
   35 |         if(A == B　&& A == C){
      |                 ^
a.cc: In function 'int main()':
a.cc:35:17: error: 'B\U00003000' was not declared in this scope
   35 |         if(A == B　&& A == C){
      |                 ^~~
Language: C++

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


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


Compiler output:
a.cc:18:6: error: stray '`' in program
   18 |     }`
      |      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
long long int A,B,C;
  cin >> A >> B >> C;
  long long int D=max(abs(A-B),max(abs(B-C),abs(C-A)));
  if (D==0)cout << -1 <<endl;
  int count=0;
  else {
  	if (A%2==1 || B%2==1 || C%2==1)cout << count <<endl;
    else {
      count++;
      long long int D,E,F;
      D=(B+C)/2;
      E=(C+A)/2;
      F=(A+B)/2;
      A=D;
      B=E;
      C=F;
    }
  
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else {
      |   ^~~~
Language: C++

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


int main()
{
    double a,b,c;
    int r=0;
    double arr[3];
    int p=-1;
    double t1,t2,t3;

    cin>>a>>b>>c;
    if(a==b&&a==c&&b==c)
    {
      cout<<p<<endl;
    }
    else if(a%2==1||b%2==1||c%2==1)
    {
        cout<<p<<endl;
    }
    else
    {

        arr[0]=a;
        arr[1]=b;
        arr[2]=c;
        sort(arr,arr+3);
        a=arr[0];
        b=arr[1];
        c=arr[2];

        while(1)
        {
            a=a/2;
            b=b/2;
            c=c/2;
            t1=a;
            a=a+b;
            b=b+c;
            c=c+t1;
            arr[0]=a;
            arr[1]=b;
            arr[2]=c;
            sort(arr,arr+3);
            a=arr[0];
            b=arr[1];
            c=arr[2];
            if(arr[0]<1)
            {
                cout<<p<<endl;
            }
            else
            {
                r++;
                if(a%2==1||b%2==1||c%2==1)
                {
                    cout<<r<<endl;
                    break;
                }
            }

        }







    }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   18 |     else if(a%2==1||b%2==1||c%2==1)
      |             ~^~
      |             | |
      |             | int
      |             double
a.cc:18:22: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   18 |     else if(a%2==1||b%2==1||c%2==1)
      |                     ~^~
      |                     | |
      |                     | int
      |                     double
a.cc:18:30: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   18 |     else if(a%2==1||b%2==1||c%2==1)
      |                             ~^~
      |                             | |
      |                             | int
      |                             double
a.cc:56:21: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   56 |                 if(a%2==1||b%2==1||c%2==1)
      |                    ~^~
      |                    | |
      |                    | int
      |                    double
a.cc:56:29: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   56 |                 if(a%2==1||b%2==1||c%2==1)
      |                            ~^~
      |                            | |
      |                            | int
      |                            double
a.cc:56:37: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   56 |                 if(a%2==1||b%2==1||c%2==1)
      |                                    ~^~
      |                                    | |
      |                                    | int
      |                                    double
Language: C++

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


int main()
{
    double a,b,c;
    int r=0;
    int arr[3];
    int p=-1;
    int t1,t2,t3;

    cin>>a>>b>>c;
    if(a==b&&a==c&&b==c)
    {
      cout<<p<<endl;
    }
    else if(a%2==1||b%2==1||c%2==1)
    {
        cout<<p<<endl;
    }
    else
    {

        arr[0]=a;
        arr[1]=b;
        arr[2]=c;
        sort(arr,arr+3);
        a=arr[0];
        b=arr[1];
        c=arr[2];

        while(1)
        {
            a=a/2;
            b=b/2;
            c=c/2;
            t1=a;
            a=a+b;
            b=b+c;
            c=c+t1;
            arr[0]=a;
            arr[1]=b;
            arr[2]=c;
            sort(arr,arr+3);
            a=arr[0];
            b=arr[1];
            c=arr[2];
            if(arr[0]<1)
            {
                cout<<p<<endl;
            }
            else
            {
                r++;
                if(a%2==1||b%2==1||c%2==1)
                {
                    cout<<r<<endl;
                    break;
                }
            }

        }







    }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   18 |     else if(a%2==1||b%2==1||c%2==1)
      |             ~^~
      |             | |
      |             | int
      |             double
a.cc:18:22: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   18 |     else if(a%2==1||b%2==1||c%2==1)
      |                     ~^~
      |                     | |
      |                     | int
      |                     double
a.cc:18:30: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   18 |     else if(a%2==1||b%2==1||c%2==1)
      |                             ~^~
      |                             | |
      |                             | int
      |                             double
a.cc:56:21: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   56 |                 if(a%2==1||b%2==1||c%2==1)
      |                    ~^~
      |                    | |
      |                    | int
      |                    double
a.cc:56:29: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   56 |                 if(a%2==1||b%2==1||c%2==1)
      |                            ~^~
      |                            | |
      |                            | int
      |                            double
a.cc:56:37: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   56 |                 if(a%2==1||b%2==1||c%2==1)
      |                                    ~^~
      |                                    | |
      |                                    | int
      |                                    double
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define MM 1000000000;
#define mod MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 100005
#define NIL -1
int main(){
    ll a, b, c; cin >> a >> b >> c;
    ll ans;
    for(int i = 0; i < 30; i++){
        if(a == b && b == c){
            ans = -1; break;
        }
        if(a*b*c % 2 == 1){
            ans = i; break;
        }
        ll s = a, t = b; u = c;
        a = (t+u)/2;
        b = (u+s)/2;
        c = (s+t)/2;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:26: error: 'u' was not declared in this scope
   20 |         ll s = a, t = b; u = c;
      |                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 10000000005
#define NIL -1
int main(){
    ll a, b, c; cin >> a >> b >> c;
    ll s = a, t = b, u = c;
    ll ans = 0;
    for(ll i = 0;; i++){
        if(a == b && b == c) {
            if(a % 2 == 0)ans = -1;
            else ans = i;
        if(a%2==1 || b%2== 1 || c%2==1) ans = i;
        else {
            a += (t+u)/2, b += (s+u)/2, c += (s+t)/2;
            s = a, t = b, u = c;
        }
        cout << ans << endl;
    }
}

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

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 10000000005
#define NIL -1
int main(){
    ll a, b, c; cin >> a >> b >> c;
    ll s = a, t = b, u = c;
    ll ans = 0;
    for(ll i = 0;; i++){
        if(a == b && b == c) {
            if(a % 2 == 0)ans = -1;
            else ans = i;
        if(a%2==! || b%2== ! || c%2==1) ans = i;
        else {
            a += (t+u)/2, b += (s+u)/2, c += (s+t)/2;
            s = a, t = b, u = c;
        }
        cout << ans << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: expected primary-expression before '||' token
   18 |         if(a%2==! || b%2== ! || c%2==1) ans = i;
      |                   ^~
a.cc:18:30: error: expected primary-expression before '||' token
   18 |         if(a%2==! || b%2== ! || c%2==1) ans = i;
      |                              ^~
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:10:11: note: to match this '{'
   10 | int main(){
      |           ^
Language: C++

a, b, c = [int(x) for x in input().strip().split()]

def f(a, b, c, count):
    if a % 2 == 1 and b % 2 == 1 and c % 2 == 1:
        count += 1
        return f(a/2+b/2, c/2+b/2, a/2+c/2, count)
    elif a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        count += 1
        return f(a/2+b/2, c/2+b/2, a/2+c/2, count)
    else:
        return count

if a == b and b == c:
    print(-1)
else:
    print(f(a, b, c, 0))


Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a, b, c = [int(x) for x in input().strip().split()]
      | ^
Language: C++

#include<iostream>


using namespace std;


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

    int ans=0;

    if(A%2==!||B%2==1||C%2==1){
        cout<<0<<endl;
        return 0;
    }
    
    if(A==B&&B==C){
        cout<<-1<<endl;
        return 0;
    }
    else{
        bool ccc=true;
        while(ccc){
                ans++;

            if(A%2==1&&B%2==1&&C%2==1){
                break;
            }
            else{
                A/=2;
                B/=2;
                C/=2;
            if(A%2==1&&((A%2)!=(B%2)||(A%2)!=(C%2))||B%2==1&&((B%2)!=(A%2)||(B%2)!=(C%2))||C%2==1&&((C%2)!=(A%2)||(C%2)!=(B%2))){
                ccc=0;
                break;
            }
                
            }
        }
    }

    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: expected primary-expression before '||' token
   13 |     if(A%2==!||B%2==1||C%2==1){
      |              ^~
Language: Java

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;

public class Main1 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int[] P = new int[3];
		int i = 0;
		while(i < 3) {
			P[i] = scan.nextInt();
			i++;
		}
		if((P[0] == P[1]) && (P[1] == P[2])){
			System.out.println(-1);
			return;
		}
		
		int x=0,y=0,z=0;
		int count = 0;
		while(true){
			x = P[0]/2;
			y = P[1]/2;
			z = P[2]/2;
			
			P[0] = 0;
			P[1] = 0;
			P[2] = 0;
			
			P[0] = y + z;
			P[1] = x + z;
			P[2] = x + y;
			
			count++;
			
			if((P[0]%2 != 0) || (P[1]%2 != 0) || (P[2]%2 != 0)){
				System.out.print(count);
				return;
			}
			
			
		}
		
		
	}

}

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

import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;

public class A_Cookie {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int[] P = new int[3];
		int i = 0;
		while(i < 3) {
			P[i] = scan.nextInt();
			i++;
		}
		if((P[0] == P[1]) && (P[1] == P[2])){
			System.out.println(-1);
			return;
		}
		
		int x=0,y=0,z=0;
		int count = 0;
		while(true){
			x = P[0]/2;
			y = P[1]/2;
			z = P[2]/2;
			
			P[0] = 0;
			P[1] = 0;
			P[2] = 0;
			
			P[0] = y + z;
			P[1] = x + z;
			P[2] = x + y;
			
			count++;
			
			if((P[0]%2 != 0) || (P[1]%2 != 0) || (P[2]%2 != 0)){
				System.out.print(count);
				return;
			}
			
			
		}
		
		
	}

}

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

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args)throws Exception {
		BufferedReader br = new BufferedReader ( new InputStreamReader(System.in));
		String [] input = br.readLine().split(" ");
		int A = Integer.parseInt(input[0]);
		int B = Integer.parseInt(input[1]);
		int C = Integer.parseInt(input[2]);
		int defineA= A;
		int defineB = B;
		int defineC = C;
		int result = 0;
		if(Even(A,B,C)) {
			result = -1;
		}else {
			while(true) {
				int A2 = A/2;
				int B2 = B/2;
				int C2 = C/2;
				A = B2 + C2;
				B = A2 + C2;
				C = A2 + B2;
				result++;
				if(Even(A) || Even(B) || Even(C)) {
					break;
				}/*else if(defineA == A && defineB == B && defineC == C) {
					result = -1;
					break;
				}*/
			}
		}
		System.out.println(result);
	}
	private static boolean Even(int A,int B,int C) {
		return (A % 2!=0) && (B % 2!=0) && (C % 2!=0);
	}
	private static boolean Even(int var) {
		return (var % 2!=0);
	}


Compiler output:
Main.java:42: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

#include <iostream>
#include<string>
using namespace std;
int main() {
	long long a, b,c;
	int iwa = 0;
	cin >> a >> b>>c;
	for (;;) {
		if (a % 2 != 0 || b % 2 != 0 || c % 2 != 0) { cout << iwa << endl; break; }
		else if (a == b && b == c) { cout << -1 << endl; break; }
		a = b / 2 + c / 2;
		b = a / 2 + c / 2;
		c = b / 2 + a / 2;
		iwa++;
	    }

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

#include <iostream>
#include <stdio.h>
#include <algorithm>
//#include <string>
//#include <math.h>
//#include <vector>

using namespace std;

int main() {
  int a, b, c;
  long int a0, b0, c0; 
  long int counter=0;

  cin >> a0 >> b0 >> c0; 

  
  while(a0%2==0 && b0%2==0 && c0%2==0){
    counter++;
    a = b0/2+c0/2;
    b = c0/2+a0/2;
    c = a0/2+b0/2;
    
    if(a==b && b==c){
      counter = -1;
      break;
    }
    a0=a;b0=b;c0=c;
  }

  cout << counter;
  return 0; 
}
　　

Compiler output:
a.cc:34:1: error: extended character 　 is not valid in an identifier
   34 | 　　
      | ^
a.cc:34:1: error: extended character 　 is not valid in an identifier
a.cc:34:1: error: '\U00003000\U00003000' does not name a type
   34 | 　　
      | ^~~~
Language: C++

#include<stdio.h>
#include<iostream>
#include<string>
#include<math.h>
#include<cmath>
#include<algorithm>
#include<map>
#include<queue>
#include<stack>
#include<vector>
#include<time.h>
#include<ctime>
#include<functional>
#define int long long
#define INT INT_MAX
#define LONG LLONG_MAX
#define f(i,n) for(int i=0;i<(n);i++)
#define P pair<int,int>
typedef long long ll;
using namespace std;

char mutu(int a,int b) {
	if (a > b) return '>';
	else return '<';
}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:41:17: error: 'n' was not declared in this scope
   41 |         cout << n << endl;
      |                 ^
Language: C++

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

const int mnx = 3e5 + 9;
const int mod = 1e9 + 7;

int n, m;
int a, b;
int cnt[mnx];

int main(){

cin>>n>>m;

for(int i=0; i<m; i++){
    cin>>a>>b;
    cnt[a]++; cnt[b]++;
}

for(int i=1; i<=n; i++){
    if(cnt[i] % 2 != 0){
        cout<<"NO\n";
        return 0;
    }
}

cout<<"YES\n";

return 0;
}
return 0;

}













Compiler output:
a.cc:33:1: error: expected unqualified-id before 'return'
   33 | return 0;
      | ^~~~~~
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: C

#include<iostream>
using namespace std;
int main()
{
	long long A, B, C;
	while( cin >> A >> B >> C ){
		if(A%2 == 1 || B%2 == 1 || C%2 == 1)
			cout << "0" << endl;
		else{
			long long cnt = 0;
			for( ; ; ){
				int t1, t2, t3;
				t1 = A;
				t2 = B;
				t3 = C;
				A = t2/2 + t3/2;
				B = t1/2 + t3/2;
				C = t1/2 + t2/2;
				cnt++;
				if( A%2 == 1 || B%2 == 1 || C%2 == 1 )	break;
				if( cnt > 1000 )		break;
			}
			if( cnt > 1000 )	cout << "-1" << endl;
			else	cout << cnt << endl;
		}
	}
	
	return 0;
}

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

#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
bool compare(int a,int b)
{
return a>b;
}
int main(){
	long long double a,b,c,e,f,g;
	cin>>a>>b>>c;
	int n=0;
	while(n<1000000){
		n++;
		e=a;g=b;f=c;
		a=(g+f)/2.0;
		b=(e+f)/2.0;
		c=(e+g)/2.0;
		if(a>(int)a||b>(int)b||c>(int)c){
			n--;
			cout<<n<<endl;
			break;
		}
			
	}
	if(n==1000000)
		printf("-1\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'long long' specified with 'double'
   10 |         long long double a,b,c,e,f,g;
      |              ^~~~
a.cc:10:14: error: 'long long' specified with 'double'
a.cc:10:14: error: 'long long' specified with 'double'
a.cc:10:14: error: 'long long' specified with 'double'
a.cc:10:14: error: 'long long' specified with 'double'
a.cc:10:14: error: 'long long' specified with 'double'
Language: C

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int a,b,c,ta,tb;
	while(cin>>a>>b>>c){
		for(int i=1;;i++){
		ta=a;tb=b;
		a=b/2+c/2;
		b=ta/2+c/2;
		c=ta/2+tb/2;
		if(a%2==1 || b%2==1 || c%2==1){
			cout<<i<<endl;break;
		}
		if(a==b && a==c){
			cout<<"-1"<<endl;break;
		}
	}
	}
	
	return 0; 
}

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

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int a,b,c,ta,tb;
	while(cin>>a>>b>>c){
		for(int i=1;;i++){
		ta=a;tb=b;
		a=b/2+c/2;
		b=ta/2+c/2;
		c=ta/2+tb/2;
		if(a%2==1 || b%2==1 || c%2==1){
			cout<<i;break;
		}
		if(a==b && a==c){
			cout<<"-1";break;
		}
	}
	}
	
	return 0; 
}

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

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

for i in range(100):
    if a%2==1 or b%2==1 or c%2==1:
        break
    a, b, c = (a+b)//2,(b+c)//2,(c+a)//2
ans = i
if i == 99:
    ans = -1
print(ans)


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

#include<iostream>
#include<algorithm>
#include<math.h>
#include<cstdio>
#include<ctype.h>
#include<stdio.h>
#include<set>
#include<vector>
#include<map>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<numeric>
#include<string>
typedef long long ll;
using namespace std;
 
ll gcd(ll a, ll b){
if(a<b){return gcd(b,a);}
else if(a%b){return gcd(b,a%b);}
else{return b;}
}
int main(){
ll a,b,c;
cin>>a>>b>>c;
ll ans = 0;
if(a==b&&b==c&&a%2==0){
    cout<<-1<<endl;　return 0;
    }
while(a%2==0&&b%2==0&&c%2==0){
  ans++;
  int x=(b+c)/2,y=(c+a)/2,z=(a+b)/2;
  a=x,y=b,z=c;
}
cout<<ans<<endl;
}

Compiler output:
a.cc:30:20: error: extended character 　 is not valid in an identifier
   30 |     cout<<-1<<endl;　return 0;
      |                    ^
a.cc: In function 'int main()':
a.cc:30:20: error: '\U00003000return' was not declared in this scope
   30 |     cout<<-1<<endl;　return 0;
      |                    ^~~~~~~~
Language: C++

def count(seq):
    seq = sorted(seq)
    x , y = [seq[1] - seq[0], seq[2] - seq[0]]
    if x == 0 and y == 0:
        return -1
    elif x == 0:
        k = x & -x
    elif y == 0:
        k = y & -y
    else:
        k = min(x & -x, y & -y)
    foo = 0
    while (k & 1) == 0:
        k >>= 1
        foo += 1
    return foo

def main():
    seq = [int(x) for x in raw_input().strip().split()]
    print count(seq)

if __name__ == '__main__':
    main()

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

#include <iostream>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  if(a==b==c){
    cout<<"-1"<<endl;
  }
  int aa=a,bb=b,cc=c,count=0;
  else{
    while(a%2==0&&b%2==0&&c%2==0){
       a=bb/2+cc/2;
       b=cc/2+aa/2;
       c=aa/2+bb/2;
      aa=a;
      bb=b;
      cc=c;
      count+=1;
    }
    cout<<(count-count%3)/3<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else{
      |   ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include<string>
#include<cmath>
#include<stack>
#include <vector>
#include<queue>
#include <random>
#include <cstdint>
#include <bitset>
#include <iomanip>
using namespace std;

int main() {
	int a[3],b=0;
	for (int i = 0; i < 3; i++) {
		scanf_s("%d", &a[i]);
		a[i] %= 4;
		if (a[i] % 2 == 1) {
			cout << 0 << endl;
			return 0;
		}
		b += a[i];
	}
	if (b == 0)cout << 3 << endl;
	else if (b == 6)cout << -1 << endl;
	else cout << 1 << endl;
	return 0;

	

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   17 |                 scanf_s("%d", &a[i]);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b,c;
  cin >> a >> b >> c;
  for(int i=0;i<50000000;i++){
    if(a%2==1||b%2==1||c%2==1){cout << i << endl; return 0;}
    aa = (b+c) / 2;
    bb = (a+c) / 2;
    cc = (a+b) / 2;
    a = aa; b = bb; c = cc;
  }
  cout << -1 << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'aa' was not declared in this scope; did you mean 'a'?
    9 |     aa = (b+c) / 2;
      |     ^~
      |     a
a.cc:10:5: error: 'bb' was not declared in this scope; did you mean 'b'?
   10 |     bb = (a+c) / 2;
      |     ^~
      |     b
a.cc:11:5: error: 'cc' was not declared in this scope; did you mean 'c'?
   11 |     cc = (a+b) / 2;
      |     ^~
      |     c
Language: C++

a,b,c=list(map(int,input().split()))
ans=0
while 1:
	if a%2!=0 or b%2!=0 or c%2!=0:
		print(ans)
		break
	if a==b and b==c:
		print('-1')
		break
	a,b,c=(b+c)>>1,(a+c)>>1,(a+b)>>2
	ans+=1;

Compiler output:
a.cc:8:23: warning: multi-character character constant [-Wmultichar]
    8 |                 print('-1')
      |                       ^~~~
a.cc:1:1: error: 'a' does not name a type
    1 | a,b,c=list(map(int,input().split()))
      | ^
Language: C++

a,b,c=list(map(int,input().split()))
if a == b and a == c :
    ans = -1
else:
    ans = int(0)
    while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        ta = b/2 + c/2
        tb = a/2 + c/2
        tc = a/2 + b/2
        a = ta
        b = tb
        c = tc
        ans += 1
print(ans)

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

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

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

    int a2, b2, c2;
    int cnt = 0;
    while(a%2==0 && b%2==0 && c%2==0){
        a2 = b/2 + c/2;
        b2 = a/2 + c/2;
        c2 = a/2 + b/2;
        if(a==a2 && b==b2 && c==c2){
            cout << "-1" << endl;
            return 0;
        }
        a = a2; b= b2; c= c2;
        cnt++;
    }
    cout << cnt << endl;
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:24:14: error: expected '}' at end of input
   24 |     return 0;
      |              ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

import std.stdio;
import std.algorithm;
import std.array;
import std.conv;
import std.string;
import std.math;

void main() {
  auto abc = readln.chomp.split.map!(to!int).array;

  long a = abc[0], b = abc[1], c = abc[2];

  if (a == b && b == c) {
    (-1).writeln;
  }
  else {
    int ans;

    while (a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
      long tmp = a / 2;
      a /= 2;
      a += c / 2;
      c /= 2;
      c += b / 2;
      b /= 2;
      b += tmp;
      ans++;
    }

    ans.writeln;
  }

  return;
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import std.algorithm;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import std.array;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import std.conv;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import std.string;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import std.math;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: '::main' must return 'int'
    8 | void main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:14: error: 'readln' was not declared in this scope
    9 |   auto abc = readln.chomp.split.map!(to!int).array;
      |              ^~~~~~
a.cc:13:12: error: 'b' was not declared in this scope
   13 |   if (a == b && b == c) {
      |            ^
a.cc:13:22: error: 'c' was not declared in this scope
   13 |   if (a == b && b == c) {
      |                      ^
a.cc:14:10: error: request for member 'writeln' in '-1', which is of non-class type 'int'
   14 |     (-1).writeln;
      |          ^~~~~~~
a.cc:30:9: error: request for member 'writeln' in 'ans', which is of non-class type 'int'
   30 |     ans.writeln;
      |         ^~~~~~~
a.cc:33:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   33 |   return;
      |   ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <queue>
using namespace std;

typedef long long i64;

i64 a,b,c;

int rec(int A,int B,int C)
{
	if(A % 2 == 1 || B % 2 == 1 || C % 2 == 1)
		return 0;
	int p = A / 2;
	int q = B / 2;
	int r = C / 2;
	return rec(q + r , p + r , p + q) + 1;
}
int main()
{
	cin >> a >> b >> c;

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

	cout << rec(a,b,c) << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: lvalue required as left operand of assignment
   23 |         if(a % 2 = 0 && a == b && b == c)
      |            ~~^~~
Language: C++

#include <iostream>
#include <vector>
#include <queue>
using namespace std;

typedef long long i64;

#define int i64

i64 a,b,c;

signed rec(int A,int B,int C)
{
	if(A % 2 == 1 || B % 2 == 1 || C % 2 == 1)
		return 0;
	int p = A / 2;
	int q = B / 2;
	int r = C / 2;
	return rec(q + r , p + r , p + q) + 1;
}
int main()
{
	cin >> a >> b >> c;

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

	cout << rec(a,b,c) << endl;
	return 0;
}


Compiler output:
a.cc:8:13: error: '::main' must return 'int'
    8 | #define int i64
      |             ^~~
a.cc:21:1: note: in expansion of macro 'int'
   21 | int main()
      | ^~~
Language: C

#include <bits/stdc++.h>

using namespace std;

#define INF 1001000100010001000
#define MOD 1000000007
#define EPS 1e-10
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
#define Rep(i, N) for (int i = 1; i < N; i++)
#define For(i, a, b) for (int i = (a); i < (b); i++)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define i_i pair<int, int>
#define vi vector<int>
#define vvi vector<vi >
#define vb vector<bool>
#define vvb vector<vb >
#define vp vector< i_i >
#define all(a) (a).begin(), (a).end()
#define Int(x) int x; cin >> x;
#define int2(x, y) Int(x); Int(y);
#define int3(x, y, z) Int(x); int2(y, z);
#define fir first
#define sec second
#define ffir first.first
#define fsec first.second
#define sfir second.first
#define ssec second.second
#define Decimal fixed << setprecision(10)

//int dxy[5] = {0, 1, 0, -1, 0};
// cmd

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

    int3(a, b, c);

    rep(i, 10001000) {
        if (a % 2 || b % 2 || c % 2) {
            cout << i << endl;
            return 0;
        }
        int aa = b/2 + c/2, bb = a/2 + c/2, cc = a/2 + b/2;
        a = aa; b = bb; c = cc;
    }
    cout << -1 << endl;

    return 0;
}


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

#include <cstdlib>
#include <cstdio>
#include <vector>
#include <cstring>
#include <iostream>
using namespace std;

const int MAXN=810;
typedef pair<int,int> ii;

vector <ii> v;

int go[4][2]={{0,-1},{0,1},{1,0},{-1,0}};
int n,m,k,sx,sy;
char a[MAXN][MAXN];

int count(int x) {	return x%k?(x/k+1):(x/k); }

int make(ii p)
{
	int m1=min(count(p.first-1),count(n-p.first));
	int m2=min(count(p.second-1),count(m-p.second));
	return min(m1,m2);
}

void dfs(int x,int y,int step)
{
	v.push_back(ii(x,y));
	book[x][y]=1;
	if(step==k+1) return;
	for(int i=0;i<4;i++)
	{
		int tx=x+go[i][0];
		int ty=y+go[i][1];
		if(tx<1 || tx>n || ty<1 ||ty>m) continue;
		if(a[tx][ty]=='.' && !book[tx][ty]) dfs(tx,ty,step+1);
	}
}

void solve()
{
	int ans=0x3f3f3f3f;
	if(sx==1 || sx==n || sy==1 || sy==m) {printf("0"); return;}
	dfs(sx,sy,0);
	for(int i=0;i<v.size();i++)
		ans=min(ans,make(v[i]));
	cout<<ans+1;
}

int main()
{
	//freopen("input","r",stdin);
	scanf("%d %d %d\n",&n,&m,&k);
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=m;j++)
		{
			scanf("%c",&a[i][j]);
			if(a[i][j]=='S')
				sx=i,sy=j;
		}
		scanf("\n");
	}
	solve();	
	return 0;
}

Compiler output:
a.cc: In function 'void dfs(int, int, int)':
a.cc:29:9: error: 'book' was not declared in this scope; did you mean 'bool'?
   29 |         book[x][y]=1;
      |         ^~~~
      |         bool