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

/*-----------------------------------------------,
|  __                                       __   |
| |  |--.-----.---.-.----.----.-----.-----.|  |_ |
| |  _  |  -__|  _  |  __|  __|  -__|  _  ||   _||
| |_____|_____|___._|____|____|_____|   __||____||
|                                   |__|         |
`-----------------------------------------------*/
#include<algorithm>
#include<array>
#include<bitset>
#include<cmath>
#include<complex>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<iterator>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>
typedef long long lint; using namespace std;
#define INF 1000000000000
#define MOD 10000007
#define rep(counter, limit) for (long long counter = 0; counter < limit; counter++)
int gcd(int a, int b) { if (a % b == 0) { return(b); } else { return(gcd(b, a % b)); } }
int lcm(int a, int b) { return a * b / gcd(a, b); }
bool primenum(int a) { if (a == 1) { return false; }if (a == 2) { return true; }if (a % 2 == 0) { return false; }for (int i = 3; i < sqrt(a) + 1; i += 2) { if (a != i) { if (a % i == 0) { return false; } } }return true; }
struct setupios{setupios(){cin.tie(0);ios::sync_with_stdio(0); /*cout<<fixed<<setprecision(20);*/};}setupios;
int main() {

  int a,b,c;cin>>a>>b>>c;
  int ans=0;
  if(a==b and (b==c and a==c)){
    cout<<-1<<endl;
    return 0;
  }
  if(a%2==1 or (b%2==1 or c%2==1)){
    cout<<0<<endl;
    return 0;
  }
  if(a%2==0 and a==b and b==c){
    cout<<-1<<endl;
  }
  while(true){
    if(ax%2==1 or(bx%2==1 or cx%2==1)){
      cout<<ans<<endl;
      return 0;
    }else{
    int ax,bx,cx;
    ax=0;bx=0;cx=0;
    ax=(b+c)/2;
    bx=(a+c)/2;
    cx=(a+b)/2;
      ans++;
      a=ax;
      b=bx;
      c=cx;
    }
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:8: error: 'ax' was not declared in this scope; did you mean 'a'?
   52 |     if(ax%2==1 or(bx%2==1 or cx%2==1)){
      |        ^~
      |        a
a.cc:52:19: error: 'bx' was not declared in this scope; did you mean 'b'?
   52 |     if(ax%2==1 or(bx%2==1 or cx%2==1)){
      |                   ^~
      |                   b
a.cc:52:30: error: 'cx' was not declared in this scope; did you mean 'c'?
   52 |     if(ax%2==1 or(bx%2==1 or cx%2==1)){
      |                              ^~
      |                              c
a.cc:56:9: error: redeclaration of 'int ax'
   56 |     int ax,bx,cx;
      |         ^~
a.cc:52:8: note: '<typeprefixerror>ax' previously declared here
   52 |     if(ax%2==1 or(bx%2==1 or cx%2==1)){
      |        ^~
a.cc:56:12: error: redeclaration of 'int bx'
   56 |     int ax,bx,cx;
      |            ^~
a.cc:52:19: note: '<typeprefixerror>bx' previously declared here
   52 |     if(ax%2==1 or(bx%2==1 or cx%2==1)){
      |                   ^~
a.cc:56:15: error: redeclaration of 'int cx'
   56 |     int ax,bx,cx;
      |               ^~
a.cc:52:30: note: '<typeprefixerror>cx' previously declared here
   52 |     if(ax%2==1 or(bx%2==1 or cx%2==1)){
      |                              ^~
Language: C++

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

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


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


def solve():
    A,B,C = map(int, input().split())
    ans = 0
    a = A
    b = B
    c = C
    while(True):
        x = int((b + c)/ 2)
        y = int((a + c)/ 2)
        z = int((a + b)/2)

        a = x
        b = y
        c = z

        ans += 1

        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            print(ans)
            return
        elif a == A and b == B and c == C:
            print(-1)
            return

solve()


Compiler output:
a.cc:2:1: error: 'def' does not name a type
    2 | def solve():
      | ^~~
Language: C++

#include <math.h>
#include <algorithm>  //sort,二分探索,など
#include <array>
#include <bitset>         //固定長bit集合
#include <cmath>          //pow,logなど
#include <complex>        //複素数
#include <deque>          //両端アクセスのキュー
#include <functional>     //sortのgreater
#include <iomanip>        //setprecision(浮動小数点の出力の誤差)
#include <iostream>       //入出力
#include <map>            //map(辞書)s
#include <numeric>        //iota(整数列の生成),gcdとlcm(c++17)
#include <queue>          //キュー
#include <set>            //集合
#include <stack>          //スタック
#include <string>         //文字列
#include <unordered_map>  //イテレータあるけど順序保持しないmap
#include <unordered_set>  //イテレータあるけど順序保持しないset
#include <utility>        //pair
#include <vector>         //可変長配列

using namespace std;
typedef long long ll;

#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (b); i--)
#define ALL(x) (x).begin(), (x).end()  // sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size())  // sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define INF 1000000000000
#define MOD 10000007
#define PB push_back
#define MP make_pair
#define F first
#define S second

int main() {
  ll a, b, c;
  cin >> a >> b >> c;
  ll n;
  n = 10 ^ 9;
  int count = 0;
  for (ll i = 0; i < n; ++i) {
    if ((a == b && b == c) && (a % 2 == 0 && b % 2 == 0 && c % 2 == 0)) {
      cout << "-1" << endl;
      return 0;
      break;
    } else if ((a % 2 != 0) || (b % 2 != 0) || (c % 2 != 0)) {
      cout << "0" << endl;
      return 0;
      break;
    } else {
      while (a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
        a = a / 2;
        b = b / 2;
        c = c / 2;
        a = b + c;
        b = c + a;
        c = a + b;
        count++;
      }
    }
    cout << count << endl;
    return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:43:10: warning: result of '10^9' is 3; did you mean '1e9'? [-Wxor-used-as-pow]
   43 |   n = 10 ^ 9;
      |          ^
      |       --
      |       1  e
a.cc:43:7: note: you can silence this warning by using a hexadecimal constant (0xa rather than 10)
   43 |   n = 10 ^ 9;
      |       ^~
      |       0xa
a.cc:67:4: error: expected '}' at end of input
   67 |   }
      |    ^
a.cc:39:12: note: to match this '{'
   39 | int main() {
      |            ^
Language: C++

a,b,c = map(int,input().split())
i=0
if a==b==c :
	print("-1")
else:
    while a%2==0 and b%2==0 and c%2==0:
        a/2
        b/2
        c/2
        i+=1
          
print(i)

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

#include<iostream>
int main(){
  int A,B,C;
  cin>>A>>B>>C;
  cout<<0<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>A>>B>>C;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout<<0<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:5:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   cout<<0<<endl;
      |            ^~~~
      |            std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0;i < (n);i++)
using namespace std;
using ll = long long;
using pii = pair<int,int>;

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

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

A,B,C = map(int,input().split())

#print(A,B,C)

if A==B and B==C:
  print(-1)
else:
  count=0
  while A%2==0 and B%2==0 and C%2==0:
    Ax=A/2
    Bx=B/2
    Cx=C/2
    #print(Ax,Bx,Cx)
    A = int(Bx+Cx)
    B = int(Cx+Ax)
    C = int(Ax+Bx)
    count +=1
    #print(A,B,C)
  print(count)    
    
         


  
  
  

Compiler output:
a.cc:3:2: error: invalid preprocessing directive #print
    3 | #print(A,B,C)
      |  ^~~~~
a.cc:13:6: error: invalid preprocessing directive #print
   13 |     #print(Ax,Bx,Cx)
      |      ^~~~~
a.cc:18:6: error: invalid preprocessing directive #print
   18 |     #print(A,B,C)
      |      ^~~~~
a.cc:1:1: error: 'A' does not name a type
    1 | A,B,C = map(int,input().split())
      | ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rrep(i, n) for(int i = n-1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;
using pli = pair<lint, lint>;
using pdd = pair<double, double>;
using pld = pair<ldouble, ldouble>;
using v1i = vector<int>;
using v1li = vector<lint>;
using v2i = vector<vector<int>>;
using v2li = vector<vector<lint>>;
using v3i = vector<vector<vector<int>>>;
using v3li = vector<vector<vector<lint>>>;
using v1b = vector<bool>;
using v2b = vector<vector<bool>>;
using v3b = vector<vector<vector<bool>>>;
using v1c = vector<char>;
using v2c = vector<vector<char>>;
using v3c = vector<vector<vector<char>>>;
constexpr lint mod1 = 1e9+7;
constexpr lint mod2 = 998244353;

int main() {
  int a, b, c, d = -1, e = 0;
  scanf("%d %d %d", &a, &b, &c);
  while(){
    if(a & 1 || b & 1 || c & 1){
      d = e;
      break;
    }
    ++e;
    int f = a/2, g = b/2, h = c/2;
    a = g + h;
    b = f + h;
    c = f + g;
    if(e > 1e5) break;
  }
  printf("%d\n", d);
  return 0;
}

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

#include<bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(),v.end()
#define INF INT_MAX;
typedef long long ll;
using namespace std;

int main(){
  int64_t a,b,c; cin >> a >> b >> c;
  if(a==b&&b==c) {
    puts("-1");
    return 0;


  int cont=0;

  while(a%2==0&&b%2==0&&c%2==0){
    int aa,bb,cc;
    aa=b/2+c/2;
    bb=c/2+a/2;
    cc=a/2+b/2;
    a=aa;
    b=bb;
    c=cc;
    cont++;
  }

  cout << cont << endl;
}


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

#include<bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(),v.end()
#define INF INT_MAX;
typedef long long ll;
using namespace std;

int main(){
  int64_t a,b,c; cin >> a >> b >> c;
  if(a==b&&b==c) {
    puts("-1");
    return 0;


  int cont=0
  
  while(a%2==0&&b%2==0&&c%2==0){
    int aa,bb,cc;
    aa=b/2+c/2;
    bb=c/2+a/2;
    cc=a/2+b/2;
    a=aa;
    b=bb;
    c=cc;
    cont++;
  }

  cout << cont << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: expected ',' or ';' before 'while'
   18 |   while(a%2==0&&b%2==0&&c%2==0){
      |   ^~~~~
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:9:11: note: to match this '{'
    9 | int main(){
      |           ^
Language: C++

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

void change_cookie(ll A, ll B, ll C, ll &count, bool &end) {
  if ((A == B) && (A == C)) {
    end = false;
    return;
  }
  else if (A % 2 == 1 || B % 2 == 1 || C % 2 == 1) {
    return;
  }
  
  else {
    ll a = A / 2;
    ll b = B / 2;
    ll c = C / 2;
    count++;
    end = true;
    change_cookie(b+c, a+c, a+b, count, end);
  }
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

a, b, c = gets.split.map(&:to_i)

ans = 0

while [a, b, c].all?(&:even?)
  if a == b && b == c
    ans = "-1"
    break
  end
  a, b, c = [(b + c) / 2, (c + a) / 2, (a + b) / 2]

  ans += 1
end

puts ans


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

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

using ll=long long;
const ll MOD=1000000007;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: expression cannot be used as a function
   11 |   while(cnt<10000&&(a-1)(b-1)(c-1)%2!=0){
      |                    ~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n, m) for (int i = (int)(n); i < (int)(m); i++)
#define repr(i, n, m) for (int i = (int)(n) - 1; i >= (int)(m); i--)
using namespace std;
using ll = int64_t;
const int MOD = 1000000007; // 10^9+7

int main() {
    ll a, b, c; cin >> a >> b >> c;
    if (a == b && b == c)
    {
        cout << (a % 2 == 0) ? -1 : 0 << endl;
        return 0;
    }

    ll ans = 0;
    while (a % 2 == 0 && b % 2 == 0 && c % 2 == 0)
    {
        ll ha = a / 2, hb = b / 2, hc = c / 2;
        a = hb + hc;
        b = hc + ha;
        c = ha + hb;
        ans++;
    }

    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:39: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   12 |         cout << (a % 2 == 0) ? -1 : 0 << endl;
      |                                     ~~^~~~~~~
Language: C++

454 414 444#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0;i<n;i++)
#define erep(i,n) for(int i = 0;i<=n;i++)
#define rep1(i,n) for(int i = 1;i<n;i++)
#define erep1(i,n) for(int i = 1;i<=n;i++)
typedef long long ll;
#define vint vector<int>
#define vvint vector<vector<int>>
#define vstring vector<string>
#define vll vector<ll>
#define vbool vector<bool>
#define INF 100000000


int main(){
  int a,b,c;
  cin >> a >> b >> c;
  int ans = INF;
  int count = 0;
  ll aa = a + c;
  ll bb = b + c;
  ll cc = a + b;
  while(aa%2 == 0){
    aa /= 2;
    count++;
  }
  ans = min(ans,count);
  count = 0;
  while(bb%2 == 0){
    bb /= 2;
    count++;
  }
  ans = min(ans,count);
  count = 0;
  while(cc%2 == 0){
    cc /= 2;
    count++;
  }
  ans = min(ans,count);
  if(a == b && b == c){
  	cout << -1 << endl;
  }
  else cout << ans << endl;

}




Compiler output:
a.cc:1:12: error: stray '#' in program
    1 | 454 414 444#include<bits/stdc++.h>
      |            ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 454 414 444#include<bits/stdc++.h>
      | ^~~
a.cc: In function 'int main()':
a.cc:18:3: error: 'cin' was not declared in this scope
   18 |   cin >> a >> b >> c;
      |   ^~~
a.cc:28:9: error: 'min' was not declared in this scope; did you mean 'main'?
   28 |   ans = min(ans,count);
      |         ^~~
      |         main
a.cc:42:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   42 |         cout << -1 << endl;
      |         ^~~~
      |         count
a.cc:42:23: error: 'endl' was not declared in this scope
   42 |         cout << -1 << endl;
      |                       ^~~~
a.cc:44:8: error: 'cout' was not declared in this scope; did you mean 'count'?
   44 |   else cout << ans << endl;
      |        ^~~~
      |        count
a.cc:44:23: error: 'endl' was not declared in this scope
   44 |   else cout << ans << endl;
      |                       ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'a' was not declared in this scope
    6 |   int sum = a + b + c;
      |             ^
a.cc:6:17: error: 'b' was not declared in this scope
    6 |   int sum = a + b + c;
      |                 ^
a.cc:6:21: error: 'c' was not declared in this scope
    6 |   int sum = a + b + c;
      |                     ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); i++) 
#define FOR(i, a, b) for(int (i) = a; (i) < (int)b; i++)
#define RREP(i, n) for(int (i)=((int)(n)-1); (i)>=0; i--)
#define RFOR(i, a, b) for(int (i) =((int)(b)-1); (i)>=(int)a; i--)
#define ALL(v) (v).begin(),(v).end()
#define MOD 1000000007
#define NIL -1
#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define SZ(x)  (int)x.size()
#define SP(x)  setprecision((int)x)


using namespace std ;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef vector<string> vstr;
typedef pair<int, int> pii;
const int INF = 1e9;
const ll LINF = 1e18;
const double EPS = 1e-9;
ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;} //最大公約数
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;} //最小公倍数

//-------------------------------------------------
// 
void yes(){
  cout <<"Yes"<<endl ;
}
void no(){
  cout <<"No"<<endl ;
}


//-------------------------------------------------
// メモ
/*






*/
//-------------------------------------------------


int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b, c ;
  cin >> a >> b >> c ;
  int cnt = 0 :
  while(1){
    if(a%2==1 ||b%2==1 || a%2==1){
      cout << cnt <<endl ;
      return 0 ;
    }
    else{
      cnt++ ;
      int sum = a+b+c ;
      a = sum - a;
      b = sum - b;
      c = sum - c;
      a /= 2 ;
      b /= 2 ;
      c /= 2 ;
    }
    if(max{(a,b,c)}==min{(a,b,c)}){
      cout << -1 <<endl ;
    }
  }
  
  
  
  return 0 ;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:58:15: error: expected ',' or ';' before ':' token
   58 |   int cnt = 0 :
      |               ^
Language: C++

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

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected unqualified-id before ',' token
    6 |   int A,B,C,,n;
      |             ^
Language: C++

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


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >>A>>B>>C;
      |   ^~~
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout <<0<< endl;
      |     ^~~~
a.cc:10:16: error: 'endl' was not declared in this scope
   10 |     cout <<0<< endl;
      |                ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout <<-1<< endl;
      |     ^~~~
a.cc:14:17: error: 'endl' was not declared in this scope
   14 |     cout <<-1<< endl;
      |                 ^~~~
a.cc:25:5: error: 'cout' was not declared in this scope
   25 |     cout <<n<< endl;
      |     ^~~~
a.cc:25:16: error: 'endl' was not declared in this scope
   25 |     cout <<n<< endl;
      |                ^~~~
Language: C++

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >>a>>b>>c;
      |   ^~~
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout <<0<< endl;
      |     ^~~~
a.cc:10:16: error: 'endl' was not declared in this scope
   10 |     cout <<0<< endl;
      |                ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout <<-1<< endl;
      |     ^~~~
a.cc:14:17: error: 'endl' was not declared in this scope
   14 |     cout <<-1<< endl;
      |                 ^~~~
a.cc:25:5: error: 'cout' was not declared in this scope
   25 |     cout <<n<< endl;
      |     ^~~~
a.cc:25:16: error: 'endl' was not declared in this scope
   25 |     cout <<n<< endl;
      |                ^~~~
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:21:34: error: expected identifier before '(' token
   21 |     else if(((A/2)%2==(B/2)%2))&&((A/2)%2==(B/2)%2))
      |                                  ^
Language: C++

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


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

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


Compiler output:
a.cc:40:3: error: 'cin' does not name a type
   40 |   cin>>A,B,C;
      |   ^~~
a.cc:41:3: error: 'i' does not name a type
   41 |   i=0;
      |   ^
a.cc:42:3: error: 'n' does not name a type
   42 |   n=0;
      |   ^
a.cc:43:3: error: expected unqualified-id before 'do'
   43 |   do
      |   ^~
a.cc:65:4: error: expected unqualified-id before 'while'
   65 |   }while(i=0) ;
      |    ^~~~~
a.cc:67:3: error: 'cout' does not name a type
   67 |   cout<<n<< endl ;
      |   ^~~~
a.cc:70:1: error: expected declaration before '}' token
   70 | }
      | ^
Language: C++

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    7 | int main()
      |         ^~
a.cc:7:9: note: remove parentheses to default-initialize a variable
    7 | int main()
      |         ^~
      |         --
a.cc:7:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:8:1: error: a function-definition is not allowed here before '{' token
    8 | {
      | ^
a.cc:58:13: error: 'x' was not declared in this scope
   58 |     else if(x==1)
      |             ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: 'x' was not declared in this scope
   24 |     else if(x==1)
      |             ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:24:8: error: expected '(' before 'else'
   24 |     if else(x==1)
      |        ^~~~
      |        (
a.cc:29:5: error: 'else' without a previous 'if'
   29 |     else
      |     ^~~~
Language: C++

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

int main() 
{
  int A,B,C,i,n;
  bool isinf(float x);
  cin>>A,B,C;
  i=0;
  n=0;
  do
  {
    if(((A%2==1)||(B%2==1))||(C%2==1))
    {
      i++;
    }
    else if((A%2==B%2)&&(A%2==B%2))
    {
      A=(A/2)+(B/2);
      B=(C/2)+(B/2);
      C=(A/2)+(C/2);
      n++;
    }
    else
    {
      i++;
    }
  }while(i=0) 
  cout<<n<< endl ;   
    
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:14: error: expected ';' before 'cout'
   28 |   }while(i=0)
      |              ^
      |              ;
   29 |   cout<<n<< endl ;
      |   ~~~~
Language: C++

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

int main() 
{
  int A,B,C,i,n;
  bool isinf(float x);
  cin>>A,B,C;
  i=0;
  n=0;
  do
  {
    if(((A%2==1)||(B%2==1))||(C%2==1))
    {
      i++;
    }
    else if((A%2==B%2)&&(A%2==B%2))
    {
      A=(A/2)+(B/2);
      B=(C/2)+(B/2);
      C=(A/2)+(C/2);
      n++;
    }
    else
    {
      i++;
    }
  }while(i=0)
 cout<<n<< endl ;   
    
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:14: error: expected ';' before 'cout'
   28 |   }while(i=0)
      |              ^
      |              ;
   29 |  cout<<n<< endl ;
      |  ~~~~
Language: C++

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

int main() 
{
  int A,B,C,i,n;
  bool isinf(float x);
  cin>>A,B,C;
  i=0;
  n=0;
  do
  {
    if(((A%2==1)||(B%2==1))||(C%2==1))
    {
      i++;
    }
    else if((A%2==B%2)&&(A%2==B%2))
    {
      A=(A/2)+(B/2);
      B=(C/2)+(B/2);
      C=(A/2)+(C/2);
      n++;
    }
    else
    {
      i++;
    }
  }while(i=0)
 cout<<n<< end1 ;   
    
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:14: error: expected ';' before 'cout'
   28 |   }while(i=0)
      |              ^
      |              ;
   29 |  cout<<n<< end1 ;
      |  ~~~~         
a.cc:29:12: error: 'end1' was not declared in this scope
   29 |  cout<<n<< end1 ;
      |            ^~~~
Language: C++

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

int main() 
{
  int A,B,C,i,n;
  bool isinf(float x);
  cin>>A,B,c;
  i=0;
  n=0;
  do
  {
    if(((A%2==1)||(B%2==1))||(C%2==1))
    {
      i++;
    }
    else if((A%2==B%2)&&(A%2==B%2))
    {
      A=(A/2)+(B/2);
      B=(C/2)+(B/2);
      C=(A/2)+(C/2);
      n++;
    }
    else
    {
      i++;
    }
  }while(i=0)
 cout<<n ;   
    
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'c' was not declared in this scope
    8 |   cin>>A,B,c;
      |            ^
a.cc:28:14: error: expected ';' before 'cout'
   28 |   }while(i=0)
      |              ^
      |              ;
   29 |  cout<<n ;
      |  ~~~~
Language: C++

#include <iostream>
//#include <iomanip>
//#include <string>
//#include <vector>
//#include <algorithm>
//#include <utility>
//#include <set>
//#include <map>
//#include <queue>
//#include <bitset>
//#include <math.h>
using namespace std ;
using ll = long long ;
//using ld = long double ;
//using vll = vector<ll> ;
//using vvll = vector<vll> ;
//using vc = vector<char> ;
//using vvc = vector<vc> ;
//using vb = vector<bool> ;
//using vvb = vector<vb> ;
//using pll = pair<ll,ll> ;

//ll mod = 1000000007 ;
//long double pie = acos(-1) ;

//string yorn(bool a){if(a) return"Yes" ; return "No" ;}
//string YorN(bool a){if(a) return"YES" ; return "NO" ;}
//ll gcd(long long a,long long b){if(b==0) return a ; return gcd(b,a%b) ;}
//ll lcm(long long a,long long b){return a/gcd(a,b)*b ;}
//ll sa(long long a,long long b){if(a>b) return a-b ; return b-a ;}
//void mysort(vector<long long> &a){sort(a.begin(),a.end()) ;}
//void myrev(vector<long long> &a){reverse(a.begin(),a.end()) ;}

int main(){
	ll a,b,c ;
	cin >> a >> b >> c ;
	if(a==b&&b==c)[{]
		if(a&1) cout << 0 << endl ;
		else cout << -1 << endl ;
	}
	else{
		ll ans = 0 ;
		while(a%2==0&&b%2==0&&c%2==0){
			ans++ ;
			ll sum = a+b+c ;
			a = (sum-a)/2 ;
			b = (sum-b)/2 ;
			c = (sum-c)/2 ;
		}
		cout << ans << endl ;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:24: error: expected identifier before '{' token
   37 |         if(a==b&&b==c)[{]
      |                        ^
a.cc: In lambda function:
a.cc:38:17: error: expected '{' before 'if'
   38 |                 if(a&1) cout << 0 << endl ;
      |                 ^~
a.cc: In function 'int main()':
a.cc:37:26: error: expected ';' before 'if'
   37 |         if(a==b&&b==c)[{]
      |                          ^
      |                          ;
   38 |                 if(a&1) cout << 0 << endl ;
      |                 ~~        
a.cc: At global scope:
a.cc:41:9: error: expected unqualified-id before 'else'
   41 |         else{
      |         ^~~~
a.cc:52:1: error: expected declaration before '}' token
   52 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define outc cout
#define int long long
signed main(){
  int a,g[1000000]={};
  int b=0,c=1,d,e=0,f=0,l=0;
  cin>>g[0]>>g[1]>>g[2];
  while(1){
  for(int i=0;i<3;i++){
    if(g[i]%2==1) e=1;
    else{
      b=(g[0]/2);
      c=(g[1]/2);
      d=(g[2]/2);
      //outc<<b<<" "<<c<<" "<<d<<"\n";
    }
   }
  if(e) break;
    if(f==100){
      l=1;
      break;
    }
  ++f;
    
  g[0]=c+d;
  g[1]=b+d;
  g[2]=c+b;
    //cout<<g[0]<<" "<<g[1]<<" "<<g[2]<<"\n";
  }
  else cout<<f<<"\n";
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:31:3: error: 'else' without a previous 'if'
   31 |   else cout<<f<<"\n";
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define outc cout
#define int long long
signed main(){
  int a,g[1000000];
  int b=0,c=1,d,e=0,f=0;
  for(int i=0;i<3;i++){
    cin>>g[i];
  }
  while(true){
  for(int i=1;i<a;i++){
    if(g[i]%2==1) e=1;
    else{
      b=g[0]/2;
      c=g[1]/2;
      d=g[2]/2;
    }
   }
  if(e) break;
    if(f==100){
      l=1;
      break;
    }
  ++f;
  g[0]=c+d;
  g[1]=b+d;
  g[2]=c+b;
  }
  if(l) cout<<"-1\n";
  else cout<<f<<"n";
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: 'l' was not declared in this scope
   22 |       l=1;
      |       ^
a.cc:30:6: error: 'l' was not declared in this scope
   30 |   if(l) cout<<"-1\n";
      |      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define outc cout
#define int long long
signed main(){
  int a,g[1000000];
  int b=0,c=1,d,e=0,f=0;
  cin>>a;
  for(int i=0;i<3;i++){
    cin>>g[i];
  }
  while(true){
  for(int i=1;i<a;i++){
    if(g[i]%2==1) e=1;
    else{
      b=g[0]/2;
      c=g[1]/2;
      d=g[2]/2;
    }
   }
  if(e) break;
    if(f==100){
      l=1;
      break;
    }
  ++f;
  g[0]=c+d;
  g[1]=b+d;
  g[2]=c+b;
  }
  if(l) cout<<"-1\n";
  else cout<<f<<"n";
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:23:7: error: 'l' was not declared in this scope
   23 |       l=1;
      |       ^
a.cc:31:6: error: 'l' was not declared in this scope
   31 |   if(l) cout<<"-1\n";
      |      ^
Language: C++

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

const int N = 2e5 + 10;
int cnt[N];

int main() {
  	int n, m, a, b;
  	cin >> n >> m >> a >> b;
  	for (int i = 0; i < m; i++) {
		cin >> a >> b;
      	cnt[a]++:
      	cnt[b]++;
    }
  	bool ans = true;
  	for (int i = 0; i < n; i++)
      	if (cnt[i] % 2)
			ans = false;
 	cout << (ans? "YES": "NO") << "\n";
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before ':' token
   12 |         cnt[a]++:
      |                 ^
      |                 ;
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

        if(A==B && B == C){
            cout << "-1" << endl;
        }else if({
            cout << i+1 << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:18: error: expected primary-expression before '{' token
   25 |         }else if({
      |                  ^
a.cc:25:18: error: expected ')' before '{' token
   25 |         }else if({
      |                 ~^
      |                  )
a.cc:28:5: error: expected primary-expression before '}' token
   28 |     }
      |     ^
Language: C++

v#include <bits/stdc++.h>
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(), x.end()
using namespace std;
typedef long long ll ; 
typedef long double ld ;
typedef pair<ll , ll> pll ;

const ll N = 2e5 + 30 , Mod = 1e9 + 7 ;
const ll SQ = 330 ;

ll dp[4][100] , a[N];
bool ok(ll x , ll y , ll z) {
	x &= 1 ;
	y &= 1 ;
	z &= 1 ;
	return (x + y + z > 0) ;
}
int main () {
    ios::sync_with_stdio(0), cin.tie(0) ;
    for (int i = 0 ; i < 3 ; i ++)cin >> a[i] ;
    for (int i = 0;  i < 3 ; i ++) dp[0][i] = a[i] ;
    if (a[0] == a[1] && a[1] == a[2] && (a[1] & 1) == 0) return cout << -1 , 0 ;
    ll cnt = 0 ;
    for (int i = 1 ; i < 100 ; i ++) {
    	if (ok(dp[i - 1][0] , dp[i - 1][1] , dp[i - 1][2])) return cout << i - 1 , 0 ;
    	for (int j = 0 ; j < 3 ; j ++) {
    		for (int k = 0 ; k < 3 ; k ++) {
    			if (j == k) continue ;
    			dp[i][j] += (dp[i - 1][k] / 2 );
			}
		}
	}
    
    return (0) ;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc:9:9: error: 'pair' does not name a type
    9 | typedef pair<ll , ll> pll ;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:22:5: error: 'ios' has not been declared
   22 |     ios::sync_with_stdio(0), cin.tie(0) ;
      |     ^~~
a.cc:22:30: error: 'cin' was not declared in this scope
   22 |     ios::sync_with_stdio(0), cin.tie(0) ;
      |                              ^~~
a.cc:25:65: error: 'cout' was not declared in this scope
   25 |     if (a[0] == a[1] && a[1] == a[2] && (a[1] & 1) == 0) return cout << -1 , 0 ;
      |                                                                 ^~~~
a.cc:28:68: error: 'cout' was not declared in this scope
   28 |         if (ok(dp[i - 1][0] , dp[i - 1][1] , dp[i - 1][2])) return cout << i - 1 , 0 ;
      |                                                                    ^~~~
Language: C++

//libs

#include <bits/stdc++.h>

//other stuff

using namespace std;

//function call

//main

int main () {
	int a,b,c,s2,s3,s1,g=0;
	cin >> a >> b >> c;
	if (a==b&&c==b&&a%2==0) {
        	cout<<-1<<endl;
        	return 0;
    	}
    	while (a%2==0&&b%2==0&&c%2==0) {
        	count++;
        	 s1 = (b/2)+(c/2);
       		 s2 = (c/2)+(a/2);
        	 s3 = (a/2)+(b/2);
 
        	a=s1;
        	b=s2;
        	c=s3;
    	}
    	cout<<g<<endl;	
return 0;
}

//functions



Compiler output:
a.cc: In function 'int main()':
a.cc:21:22: error: no post-increment operator for type
   21 |                 count++;
      |                      ^~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;

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

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

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

    else{
        while(A%2==0 && B%2==0 && C%2==0){
            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:6: error: expected '}' at end of input
   27 |     }
      |      ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

bool is_odd(int x) {
  return x % 2 == 1;
}

int main() {
  int a, b, c;
  cin >> a >> b >> c;
  
  if (a == b && b == c) {
    if (a % 2 == 0) puts("-1");
    else puts("0");
    return 0;
  }
  int and = 0;
  while (!is_odd(a) &&!is_odd(b) && !is_odd(c) ) {
    int a_ = b / 2 + c / 2;
    int b_ = a / 2 + c / 2;
    int c_ = a / 2 + b / 2;
    a = a_;
    b = b_;
    c = c_;
    ans++;
  }
  
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: expected unqualified-id before '=' token
   18 |   int and = 0;
      |           ^
a.cc:26:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |     ans++;
      |     ^~~
      |     abs
a.cc:29:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   29 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); i++)

int int_len(int n) {
  int s=0;
  while(n!=0) s++, n/=10;
  return s;
}

int int_sum(int n) {
  int m=0,s=0,a=n;
  while(a!=0) s++, a/=10;
  for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10;
  return m;
}

int vec_sum(vector<int> v){
  int n=0;
  for(int i=0;i<v.size();i++) n+=v[i];
  return n;
}

int main() {
  int x,a,b,c,ans=0;
  vector<int> n(3);
  rep(i,3) cin>>n[i];
  if(n[0]==n[1] && n[1]==n[2]){
    if(n[0]%2==0){
      cout<<-1<<endl;
    }else if(n[0]%2!=0){
      cout<<0<<endl;
    }
  }
  sort(n.begin(),b.end());
  
  x=n[2]-n[0];
  
  while(x%2==0){
    x/=2;
    if(a%2==0 && b%2==0 && c%2==0){
      a=(n[0]+n[1])/2;
      b=(n[0]+n[2])/2;
      c=(n[1]+n[2])/2;
      n[0]=a;
      n[1]=b;
      n[2]=c;
      ans++;
    }else{
      cout<<ans<<endl;
      return 0;
    }
    
    
    
    
  }
  
  
  
  
  
  
  
  
  
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:20: error: request for member 'end' in 'b', which is of non-class type 'int'
   35 |   sort(n.begin(),b.end());
      |                    ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, j, n) for (ll i = j; i < n; i++)
#define all(x) (x).begin(),(x).end()
#define INF (1000000000)
#define MOD (1000000007)
#define MAX (100000)
#define pii pair<int, int>

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

class XY{
public:
  ll x, y;
  XY() {x = y = 0;}
  XY(ll u, ll v) {x = u; y = v;}
};

template<typename T1, typename T2>
void chmin(T1 &a, T2 b) {if(a > b) a = b;}
template<typename T1, typename T2>
void chmax(T1 &a, T2 b) {if(a < b) a = b;}

template<typename T1, typename T2>
ll mypow(T1 a, T2 n){
  if(n == 0) return 1;
  if(n == 1) return a;
  if(n % 2) return a * mypow(a, n - 1);
  ll tmp = mypow(a, n / 2);
  return tmp * tmp;
}

template<typename T>
int BS(vector<T> V, int left, int right, T key){
  int mid = (left + right) / 2;
  if(V[mid] <= key) left = mid;
  else right = mid;
  if(right - mid == 1) return left;
  else return BS(V, left, right, key);
}

ll comb(ll n, ll r){
	ll res = 1;
  rep(i, 0, r){
    res *= n - i;
    res /= i + 1;
  }
  return res;
}

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

void Main() {
  ll A, B, C; cin >> A >> B >> C;
  if(A == B && B == C){
    cout << -1 << endl;
    return;
  }
  ll cnt = 0;
  while(true){
    bool ok = true;
    if(A % 2) ok = false;
    if(B % 2) ok = false;
    if(C % 2) ok = false;
    if(!ok) break;
    ll a, b, c;
    a = A; b = B; c = C;
    A = b / 2 + c / 2;
    B = a / 2 + c / 2:
    C = a / 2 + b / 2;
    cnt++;
  }
  cout << cnt << endl;
}

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

int main(){
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << std::fixed << std::setprecision(15);

  Main();
}


Compiler output:
a.cc: In function 'void Main()':
a.cc:70:22: error: expected ';' before ':' token
   70 |     B = a / 2 + c / 2:
      |                      ^
      |                      ;
Language: C++

#include <iostream>
using namespace std;
int main(){
  int A,B,C;
  cin>>A>>B>>C;
  int ans=0;
  while (A%2==0 && B%2==0 && C%2==0){
    A1=B/2+C/2;
    B1=A/2+C/2;
    C1=A/2+B/2;
    ans++;
    A=A1;
    B=B1;
    C=C1;
    if(ans>10000){
      ans=-1;
      break;
    }
  }
  cout<<ans<<endl;
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'A1' was not declared in this scope; did you mean 'A'?
    8 |     A1=B/2+C/2;
      |     ^~
      |     A
a.cc:9:5: error: 'B1' was not declared in this scope; did you mean 'B'?
    9 |     B1=A/2+C/2;
      |     ^~
      |     B
a.cc:10:5: error: 'C1' was not declared in this scope; did you mean 'C'?
   10 |     C1=A/2+B/2;
      |     ^~
      |     C
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
 bool prime(int a){
   if(a<2)
     return false;
   else if(a==2)
     return true;
   else if(a%2==0)
     return false;
   double b=sqrt(a);
    for(int i=3;i<=b;i+=2){
      if(a%i==0){
        return false;
      }
    }
   return true;
 }
signed main(){
  int a,b,c,d,e,f,g=0;
  cin>>a>>b>>c;
  if(a==b&&b==c&&a%2=0)
    cout<<-1<<endl;
  else{
    while(1){
      if(a%2==0&&b%2==0&&c%2==0){
        g++;
        d=a/2;
        e=b/2;
        f=c/2;
        a=d+e;
        b=e+f;
        c=f+d;
      }
      else
        break;
    }
    cout<<g<<endl;
  }
}

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

  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: 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