criyle/codenet-compile-errors huggingface dataset:
Language: Java

public class Main {
 
    public static void main(String[] args) {
        // write your code here
        /*
        System.out.println(ruijou(33));
        System.exit(0);
 
        */
        Scanner scanner = new Scanner(System.in);
        long x=scanner.nextLong();
        long y=scanner.nextLong();
        long z=y/x;
        System.out.println(ruijou(z)+1);
    }
    public static long ruijou(long n){
        if(n<2){
            return 0;
        }else{
            return ruijou(n/2)+1;
        }
    }
}

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

#include<cstring>  
#include<string>  
#include<algorithm>  
#include<iostream>  
#include<cmath>  
#include<cstdlib>  
#include<ctime>  
#include<map>  
#include<queue>  
#include<vector>  
#include<stack>  
#include<set>  
#define pa pair<int,int>  
#define INF 0x3f3f3f3f  
#define inf 0x3f  
#define fi first  
#define se second  
#define mp make_pair  
#define ll long long  
#define ull unsigned long long  
#define pb push_back  
#define pause system("pause")  
  
using namespace std;  
  
inline ll read()  
{  
    long long f=1,sum=0;  
    char c=getchar();  
    while (c<'0' || c>'9')  
    {  
        if (c=='-') f=-1;  
        c=getchar();  
    }     
    while (c>='0' && c<='9')  
    {  
        sum=sum*10+c-'0';  
        c=getchar();  
    }  
    return sum*f;  
}  
int main()  
{  
    ll l=read(),r=read();  
    int ans=0;  
    while (r>=l) l*=2,ans++;   
    cout<<ans;  
    return 0;  
}

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

#include<iostream>
using namespace std;

long long int X, Y;
int counter = 0;

int main()
{
  cin >> X >> Y;
  while (X =< Y) {
    X *= 2;
    counter++;
  }
  cout << counter;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected primary-expression before '<' token
   10 |   while (X =< Y) {
      |             ^
Language: C++

#include <bits/stdc++.h>

#define FOR(i, j, n) for (int i(j); i < n; ++i)
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define dbg(x) std::cerr<<#x<<" = " << (x) << std::endl
#define pnl(x) std::cout << x << "\n"

typedef	std::vector<int>	vi;
typedef std::pair<int,int>	ii;
typedef std::vector<std::string>	vs;
typedef std::vector<ii>	vii;
typedef std::vector<long long>	vl;
typedef	long long ll;


const int	NB_D = 4;
const int	DY[] = {-1, 1, 0, 0};
const int	DX[] = {0, 0, -1, 1};

int		main(void)
{
	std::ios_base::sync_with_stdio(false);
	unsigned long long l, r;
	std::cin >> l >> r;
	int		cnt = 0;
	while (l <=	r)
		l *= 2, cnt++;
	pnl(cnt);
}

#include <bits/stdc++.h>

#define FOR(i, j, n) for (int i(j); i < n; ++i)
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define dbg(x) std::cerr<<#x<<" = " << (x) << std::endl
#define pnl(x) std::cout << x << "\n"

typedef	std::vector<int>	vi;
typedef std::pair<int,int>	ii;
typedef std::vector<std::string>	vs;
typedef std::vector<ii>	vii;
typedef std::vector<long long>	vl;
typedef	long long ll;


const int	NB_D = 4;
const int	DY[] = {-1, 1, 0, 0};
const int	DX[] = {0, 0, -1, 1};

int		main(void)
{
	std::ios_base::sync_with_stdio(false);
	unsigned long long l, r;
	std::cin >> l >> r;
	int		cnt = 0;
	while (l <=	r)
		l *= 2, cnt++;
	pnl(cnt);
}



Compiler output:
a.cc:48:17: error: redefinition of 'const int NB_D'
   48 | const int       NB_D = 4;
      |                 ^~~~
a.cc:17:17: note: 'const int NB_D' previously defined here
   17 | const int       NB_D = 4;
      |                 ^~~~
a.cc:49:17: error: redefinition of 'const int DY []'
   49 | const int       DY[] = {-1, 1, 0, 0};
      |                 ^~
a.cc:18:17: note: 'const int DY [4]' previously defined here
   18 | const int       DY[] = {-1, 1, 0, 0};
      |                 ^~
a.cc:50:17: error: redefinition of 'const int DX []'
   50 | const int       DX[] = {0, 0, -1, 1};
      |                 ^~
a.cc:19:17: note: 'const int DX [4]' previously defined here
   19 | const int       DX[] = {0, 0, -1, 1};
      |                 ^~
a.cc:52:17: error: redefinition of 'int main()'
   52 | int             main(void)
      |                 ^~~~
a.cc:21:17: note: 'int main()' previously defined here
   21 | int             main(void)
      |                 ^~~~
Language: Java

import java.util.*;
class MultipleGift
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
long x=sc.nextLong();
long  y=sc.nextlong();
long count=0;
while(y>=x)
{
count+=1;
y=y/2;
}
System.out.println(count);
}
}

Compiler output:
Main.java:8: error: cannot find symbol
long  y=sc.nextlong();
          ^
  symbol:   method nextlong()
  location: variable sc of type Scanner
1 error
Language: C++

#include <iostream>
#include <cmath>
 
int main(){
 long double x,y; std::cin >> x >> y; std::cout << (int)( log(y/x) / log(2) + 1e-8) + 1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:92: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |  long double x,y; std::cin >> x >> y; std::cout << (int)( log(y/x) / log(2) + 1e-8) + 1 << endl;
      |                                                                                            ^~~~
      |                                                                                            std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <cmath>

int main(){
 long double x,y; cin >> x >> y; cout << (int)( log(y/x) / log(2) + 1e-8) + 1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |  long double x,y; cin >> x >> y; cout << (int)( log(y/x) / log(2) + 1e-8) + 1 << endl;
      |                   ^~~
      |                   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:34: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |  long double x,y; cin >> x >> y; cout << (int)( log(y/x) / log(2) + 1e-8) + 1 << 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:82: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |  long double x,y; cin >> x >> y; cout << (int)( log(y/x) / log(2) + 1e-8) + 1 << 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++

(print (+ (inexact->exact (floor (- (log (/ (read) (read)) 2)))) 1))


Compiler output:
a.cc:1:7: error: expected ')' before '(' token
    1 | (print (+ (inexact->exact (floor (- (log (/ (read) (read)) 2)))) 1))
      | ~     ^~
      |       )
Language: C++

#include "iostream"
using namespace std;

long sec(long long j);

int _tmain(int argc, _TCHAR* argv[])
{
	long long X, Y;
	cin >> X >> Y;
	long long temp = Y / X;
	cout << sec(temp) << endl;
	return 0;
}

long sec(long long j){
	long res = 1;
	while (j > 1){
		j /= 2;
		res++;
	}
	return res;
}

Compiler output:
a.cc:6:22: error: '_TCHAR' has not been declared
    6 | int _tmain(int argc, _TCHAR* argv[])
      |                      ^~~~~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main()
{

    int x,y;
    cin >> x >> y;
    vector<int> a;
    a.push_back(x);
    while(true){
      int a0 = a.last();
      int a1 = a0 + 1;
      if(a1 > a0 && a1 % a0 == 0){
        a.push_back(a1);
      }
      if(y > a1){
        break;
      }
    }
    for(int i=0; i<a.size(); ++i){
      cout << a[i];
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: 'class std::vector<int>' has no member named 'last'; did you mean 'at'?
   12 |       int a0 = a.last();
      |                  ^~~~
      |                  at
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main()
{

    int x,y;
    cin >> x >> y;
    vector<int> a;
    i = 0;
    while(true){
      a0 = a[a.size()-1];
      a1 = a0 + 1;
      if(a1 > a0 && a1 % a0 == 0){
        a.push_back(a1);
      }
      if(y > a1){
        break;
      }
    }
    for(i=0; i<a.size(); ++i){
      cout << a[i];
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'i' was not declared in this scope
   10 |     i = 0;
      |     ^
a.cc:12:7: error: 'a0' was not declared in this scope; did you mean 'a'?
   12 |       a0 = a[a.size()-1];
      |       ^~
      |       a
a.cc:13:7: error: 'a1' was not declared in this scope; did you mean 'a'?
   13 |       a1 = a0 + 1;
      |       ^~
      |       a
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main()
{

    int x,y;
    cin >> x >> y;
    vector<int> a;
    i = 0
    while(true){
      a0 = a[a.size()-1]
      a1 = a0 + 1
      if(a1 > a0 && a1 % a0 == 0){
        a.push_back(a1)
      }
      if(y > a1){
        break;
      }
    }
    for(i=0; i<a.size(); ++i){
      cout << a[i];
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'i' was not declared in this scope
   10 |     i = 0
      |     ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main()
{

    int x,y;
    cin >> x >> y;
    vector<int> a;
    i = 0
    while(true){
      a0 = a[a.size-1]
      a1 = a0 + 1
      if(a1 > a0 && a1 % a0 == 0){
        a.push_back(a1)
      }
    }
    for(i=0; i<a.size; ++i){
      cout << a[i];
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'i' was not declared in this scope
   10 |     i = 0
      |     ^
Language: C++



#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include<string>
#include<iostream>

using namespace std;




int main(){
    long long int x,y;cin>>x>>y;
    long long int ans=(int)log2(y/x);
    ans++;
    printf("%lld\n,ans);
    return 0;
}


Compiler output:
a.cc:23:12: warning: missing terminating " character
   23 |     printf("%lld\n,ans);
      |            ^
a.cc:23:12: error: missing terminating " character
   23 |     printf("%lld\n,ans);
      |            ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:24:5: error: expected primary-expression before 'return'
   24 |     return 0;
      |     ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <cmath>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define FOR(i, n) for (int i = 0; i < int(n); i++)
#define FOR1(i, m, n) for (int i = int(m); i < int(n); i++)
#define MAX(a, b) ((a) >= (b) ? (a) : (b))
#define MIN(a, b) ((a) <= (b) ? (a) : (b))

int main(int argc, char *argv[argc])
{
  ull X, Y;

  scanf("%llu%llu", &X, &Y);

  int N = (int)(log2((double)Y / X) + 1);
  printf("%d\n", N);
  
  return 0;
}


Compiler output:
a.cc:12:26: error: expected ',' or '...' before 'argv'
   12 | int main(int argc, char *argv[argc])
      |                          ^~~~
a.cc:12:5: warning: second argument of 'int main(int, char*)' should be 'char **' [-Wmain]
   12 | int main(int argc, char *argv[argc])
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
#include<time.h>
#include<windows.h>
using namespace std;
typedef long long LL;
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1
#define __m int mid=(l+r)/2;
template<class T>
inline bool read(T &num)  
{
       char in;bool IsN=false;
       while(in=getchar(),in!='-'&&(in<'0'||in>'9'))if(in==EOF)return false;
       in=='-'?(IsN=true,num=0):num=in-'0';
       while(in=getchar(),in>='0'&&in<='9')num=num*10+in-'0';
       return IsN?num=-num:num,true;
}

const int maxn =55;
const int inf  =2e9+7;
const int mod  =1e9+7;

int main() {
#ifdef LOCAL
    freopen("sample.in", "r", stdin);
#endif
    ios::sync_with_stdio(false);
    LL a,b;
    while(cin>>a>>b)
    {
        LL temp=b/a;
        cout<<(LL)log2(temp)+1<<endl;
    }
    return 0;
}



Compiler output:
a.cc:3:9: fatal error: windows.h: No such file or directory
    3 | #include<windows.h>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
 2
 3int main(void) {
 4  long x, y;
 5  scanf("%ld%ld", &x, &y);
 6
 7  int cnt = 0;
 8  long t = x;
 9  while(1) {
10    cnt++;
11    printf("t = %ld, y = %ld\n", t, y);
12    t *= 2;
13    if (t > y) break;
14  }
15
16  printf("%d\n", cnt);
17
18  return 0;
19}

Compiler output:
a.cc:2:2: error: expected unqualified-id before numeric constant
    2 |  2
      |  ^
Language: Java

// Main.java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		final Scanner sc = new Scanner(System.in);
		long X = sc.nextLong();
		long Y = sc.nextLong();
		int counter = 0;
		while(x <= y) {
			x *= 2;
			counter++;
		}
		System.out.println(counter);
	}
}

Compiler output:
Main.java:11: error: cannot find symbol
		while(x <= y) {
		      ^
  symbol:   variable x
  location: class Main
Main.java:11: error: cannot find symbol
		while(x <= y) {
		           ^
  symbol:   variable y
  location: class Main
Main.java:12: error: cannot find symbol
			x *= 2;
			^
  symbol:   variable x
  location: class Main
3 errors
Language: Java

import java.util.LinkedList;
import java.util.Scanner;
public class main{
	public static void main(String[] args) {
		String s=new String();
		boolean judge;
		int length,cnt,cnte,cnto,temp,index;
		int[] kinds=new int[26];
		LinkedList<Integer> L=new LinkedList<Integer>();
		Scanner scan=new Scanner(System.in);
		s=scan.nextLine();
		judge= true;
		length=s.length();
		cnt=cnte=cnto=0;
		for(int i=0;i<length;i++){
			temp=s.charAt(i)-'a';
			L.add(temp);
			kinds[temp]++;
		}
		for(int i=0;i<26;i++){
			if(kinds[i]==0)
				continue;
			if(kinds[i]==length){
				judge=false;
				break;
			}
			if(kinds[i]%2==1)
				cnto++;
			else
				cnte++;
		}
		if(length==1||!judge){
			System.out.println("0");
		}
		else if(((length%2==1&&cnte!=0)||((length%2==0)&&cnto==0))&&cnto<=1){
			while(L.size()!=0){
				if(L.lastIndexOf(L.getFirst())!=-1){
					index=L.lastIndexOf(L.getFirst());
					cnt+=L.size()-1-index;
					L.remove(index);
					judge=false;
				}
				L.removeFirst();
				if(judge){
					cnt+=L.size()/2;
				}
			}
			System.out.println(cnt);
		}
			System.out.println(-1);
	}
}


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

public class main{
	public static void main(String[] args) {
		String s=new String();
		boolean judge;
		int length,cnt,cnte,cnto,temp,index;
		int[] kinds=new int[26];
		LinkedList<Integer> L=new LinkedList<Integer>();
		Scanner scan=new Scanner(System.in);
		s=scan.nextLine();
		judge= true;
		length=s.length();
		cnt=cnte=cnto=0;
		for(int i=0;i<length;i++){
			temp=s.charAt(i)-'a';
			L.add(temp);
			kinds[temp]++;
		}
		for(int i=0;i<26;i++){
			if(kinds[i]==0)
				continue;
			if(kinds[i]==length){
				judge=false;
				break;
			}
			if(kinds[i]%2==1)
				cnto++;
			else
				cnte++;
		}
		if(length==1||!judge){
			System.out.println("0");
		}
		else if(((length%2==1&&cnte!=0)||((length%2==0)&&cnto==0))&&cnto<=1){
			while(L.size()!=0){
				if(L.lastIndexOf(L.getFirst())!=-1){
					index=L.lastIndexOf(L.getFirst());
					cnt+=L.size()-1-index;
					L.remove(index);
					judge=false;
				}
				L.removeFirst();
				if(judge){
					cnt+=L.size()/2;
				}
			}
			System.out.println(cnt);
		}
			System.out.println(-1);
	}
}

Compiler output:
Main.java:1: error: class main is public, should be declared in a file named main.java
public class main{
       ^
Main.java:7: error: cannot find symbol
		LinkedList<Integer> L=new LinkedList<Integer>();
		^
  symbol:   class LinkedList
  location: class main
Main.java:7: error: cannot find symbol
		LinkedList<Integer> L=new LinkedList<Integer>();
		                          ^
  symbol:   class LinkedList
  location: class main
Main.java:8: error: cannot find symbol
		Scanner scan=new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class main
Main.java:8: error: cannot find symbol
		Scanner scan=new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class main
5 errors
Language: Java

public class main{
	public static void main(String[] args) {
		String s=new String();
		boolean judge;
		int length,cnt,cnte,cnto,temp,index;
		int[] kinds=new int[26];
		LinkedList<Integer> L=new LinkedList<Integer>();
		Scanner scan=new Scanner(System.in);
		s=scan.nextLine();
		judge= true;
		length=s.length();
		cnt=cnte=cnto=0;
		for(int i=0;i<length;i++){
			temp=s.charAt(i)-'a';
			L.add(temp);
			kinds[temp]++;
		}
		for(int i=0;i<26;i++){
			if(kinds[i]==0)
				continue;
			if(kinds[i]==length){
				judge=false;
				break;
			}
			if(kinds[i]%2==1)
				cnto++;
			else
				cnte++;
		}
		if(length==1||!judge){
			System.out.println("0");
		}
		else if(((length%2==1&&cnte!=0)||((length%2==0)&&cnto==0))&&cnto<=1){
			while(L.size()!=0){
				if(L.lastIndexOf(L.getFirst())!=-1){
					index=L.lastIndexOf(L.getFirst());
					cnt+=L.size()-1-index;
					L.remove(index);
					judge=false;
				}
				L.removeFirst();
				if(judge){
					cnt+=L.size()/2;
				}
			}
			System.out.println(cnt);
		}
			System.out.println(-1);
	}

Compiler output:
Main.java:49: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

public static void main(String[] args) {
		String s=new String();
		boolean judge;
		int length,cnt,cnte,cnto,temp,index;
		int[] kinds=new int[26];
		LinkedList<Integer> L=new LinkedList<Integer>();
		Scanner scan=new Scanner(System.in);
		s=scan.nextLine();
		judge= true;
		length=s.length();
		cnt=cnte=cnto=0;
		for(int i=0;i<length;i++){
			temp=s.charAt(i)-'a';
			L.add(temp);
			kinds[temp]++;
		}
		for(int i=0;i<26;i++){
			if(kinds[i]==0)
				continue;
			if(kinds[i]==length){
				judge=false;
				break;
			}
			if(kinds[i]%2==1)
				cnto++;
			else
				cnte++;
		}
		if(length==1||!judge){
			System.out.println("0");
		}
		else if(((length%2==1&&cnte!=0)||((length%2==0)&&cnto==0))&&cnto<=1){
			while(L.size()!=0){
				if(L.lastIndexOf(L.getFirst())!=-1){
					index=L.lastIndexOf(L.getFirst());
					cnt+=L.size()-1-index;
					L.remove(index);
					judge=false;
				}
				L.removeFirst();
				if(judge){
					cnt+=L.size()/2;
				}
			}
			System.out.println(cnt);
		}
			System.out.println(-1);
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include <cstdio>

using namespace std;

int main(void){
  int x, y, res = 0;
  cin >> x >> y;
  while (x <= y) {
    x = x*2;
    res++;
  }
  cout << res << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> x >> y;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cstdio>
  +++ |+#include <iostream>
    2 | 
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout << res << endl;
      |   ^~~~
a.cc:12:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:18: error: 'endl' was not declared in this scope
   12 |   cout << res << endl;
      |                  ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <cstdio>
  +++ |+#include <ostream>
    2 |
Language: C++

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

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i,n) for(int i=0;i<(int)n;++i)

int main(){
    ll X, Y;
    cin >> X >> Y;
    res = 1;
    while(X <= Y){
        res++;
        X *= 2;
    }
    cout << res << endl;
    return 0;
}

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

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, 
using namespace std;

#define MOD 1000000007
#define ll int 
#define ld long double
#define FOR(i,a,b) for(ll i=(ll)a;i<(ll)b;i++)
#define rep(i,n) FOR(i,0,n)
#define pb push_back
#define mp make_pair


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

  string s; cin >> s;
  ll ans=1000000;
  rep(i,s.size()-1){
    if(s[i]!=s[i+1])
      ans=min(ans,max(i+1,s.size()-i-1));
  }
 cout<<ans <<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:22: error: no matching function for call to 'max(int, std::__cxx11::basic_string<char>::size_type)'
   29 |       ans=min(ans,max(i+1,s.size()-i-1));
      |                   ~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:29:22: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   29 |       ans=min(ans,max(i+1,s.size()-i-1));
      |                   ~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:29:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   29 |       ans=min(ans,max(i+1,s.size()-i-1));
      |                   ~~~^~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, 
using namespace std;

#define MOD 1000000007
#define ll int 
#define ld long double
#define FOR(i,a,b) for(ll i=(ll)a;i<(ll)b;i++)
#define rep(i,n) FOR(i,0,n)
#define pb push_back
#define mp make_pair


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

  string s; cin >> s;
  ll ans=1000000;
  rep(i,s.size()-1){
    if(s[i]!=s[i+1])
      ans=min(ans,max(i+1,s.size()-i-1LL));
  }
 cout<<ans <<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:22: error: no matching function for call to 'max(int, long long unsigned int)'
   29 |       ans=min(ans,max(i+1,s.size()-i-1LL));
      |                   ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:29:22: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long unsigned int')
   29 |       ans=min(ans,max(i+1,s.size()-i-1LL));
      |                   ~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:29:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   29 |       ans=min(ans,max(i+1,s.size()-i-1LL));
      |                   ~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	string s;cin>>s;
	vector<int>ar;
	int cnt=1;char ch=s[0];
	for(int i=1;i<s.size();i++){
		if(ch!=s[i]){
			ar.push_back(cnt);
			cnt=1;
			ch=s[i];
		}else cnt++;
	}
	ar.push_back(cnt);
	if(ar.size()==2){cout<<max(ar[0],ar[1])<<endl;return 0;}
	int ans;
	int ans=ar[0]+ar[1];
	for(int i=1;i<ar.size()-1;i++){
		if(ar[i]+ar[i+1]<ans)ans=ar[i]+ar[i+1];
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: redeclaration of 'int ans'
   18 |         int ans=ar[0]+ar[1];
      |             ^~~
a.cc:17:13: note: 'int ans' previously declared here
   17 |         int ans;
      |             ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define lowbit(x) ((x)&((x)^((x)-1)))
#define MAXN 1100000

int a[MAXN],c[MAXN],ret;
int n;
void update(int i,int v){
    for(v-=a[i],a[i++]+=v;i<=n;c[i-1]+=v,i+=lowbit(i));
}
int query(int i){
i++;
    for (ret=0;i;ret+=c[i-1],i^=lowbit(i));
    return ret;
}

vector<char> b[2000];
char ch[MAXN];
int h[2000][3];
string str;
int main()
{

    int i,t1,t2,t3,tk;
    __int64 tot,t4;
bool d;
    i=0;
    int ttc=1;
// freopen("111.txt","r",stdin);
// freopen("222.txt","w",stdout);
    while(ttc--)
    {
        scanf("%s",ch);
        n=strlen(ch);
        for(i=1;i<=1000;i++)
{
h[i][0]=0;
h[i][1]=0;
            b[i].clear();
}
        for(i=0;i<n;i++)
            b[ch[i]].push_back(i);
tk=0;
        for(i=1;i<=1000;i++)
        {
            h[i][0]=0;
            h[i][1]=b[i].size()-1;
if (b[i].size()%2==1) tk++;
        }
if (!((tk==1&&n%2==1)||(tk==0)))
{
printf("-1\n");
continue;
}
        for(i=0;i<n;i++)
        {
            a[i]=0;
            c[i]=0;
        }
        for(i=0;i<n;i++)
            update(i,1);
        t1=0;
        t2=n-1;
        tot=0;
d=true;
        for(;;)
        {
            if (t1>=t2) break;
if (h[ch[t1]][0]==h[ch[t1]][1]&&h[ch[t2]][0]==h[ch[t2]][1])  {d=false;break;}
if (ch[t1]==ch[t2])
{
h[ch[t1]][0]++;
h[ch[t2]][1]--;
update(t1,0);
update(t2,0);
while(a[t2]==0)
                {
                    t2--;
                    if (t2<0) break;
                }
while(a[t1]==0)
                {
                    t1++;
                    if (t1>n-1) break;
                }
continue;
}
            if (h[ch[t1]][0]==h[ch[t1]][1])
            {
                t3=b[ch[t2]][h[ch[t2]][0]];
                h[ch[t2]][0]++;
h[ch[t2]][1]--;
                tot=tot+(t4=query(t3-1));
                update(t2,0);
                update(t3,0);
                while(a[t2]==0)
                {
                    t2--;
                    if (t2<0) break;
                }
            }
            else
            {
                t3=b[ch[t1]][h[ch[t1]][1]];
                h[ch[t1]][1]--;
h[ch[t1]][0]++;
                tot=tot+(t4=(query(n-1)-query(t3)));
                update(t1,0);
                update(t3,0);
                while(a[t1]==0)
                {
                    t1++;
                    if (t1>n-1) break;
                }
            }
        }
        printf("%I64d\n",tot);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
   25 |     __int64 tot,t4;
      |     ^~~~~~~
      |     __ynf64
a.cc:64:9: error: 'tot' was not declared in this scope
   64 |         tot=0;
      |         ^~~
a.cc:93:26: error: 't4' was not declared in this scope; did you mean 'tk'?
   93 |                 tot=tot+(t4=query(t3-1));
      |                          ^~
      |                          tk
a.cc:107:26: error: 't4' was not declared in this scope; did you mean 'tk'?
  107 |                 tot=tot+(t4=(query(n-1)-query(t3)));
      |                          ^~
      |                          tk
Language: Java

package Main;

import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	public static void Main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		//数列
		ArrayList<Long> list = new ArrayList<Long>();
		long a, b;
		
		//数列の数
		long count = 0;
		
		//数値取得
		Long x = scan.nextLong();
		Long y = scan.nextLong();
		
		
		long t = 0, i;
		//1,2は無視
		if (x == 1 || x == 2) {
			System.out.println(x);
			
		}else {
		
			a = x;
			b = x * 2;
			t = b;
			for (i = 2; t <= y; i++) {
				t *= 2;
			}
			System.out.println(i-1);
		}
	}
	
	public static long gcd(long m, long n) {
		long t;
		while(m % n != 0) {
			t = n;
			n = m % n;
			m = t;
		}
		return n;
	}
	
	public static long lcm(long m, long n) {
		return m * n / gcd(m, n);
	}
	
	//aはbの倍数
	public static long func(long a, long b) {
		
	}
}


Compiler output:
Main.java:57: error: missing return statement
	}
	^
1 error
Language: Java

package arc088_a;

import java.util.ArrayList;
import java.util.Scanner;

public class arc088_a {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		//数列
		ArrayList<Long> list = new ArrayList<Long>();
		long a, b;
		
		//数列の数
		long count = 0;
		
		//数値取得
		Long x = scan.nextLong();
		Long y = scan.nextLong();
		
		
		long t = 0, i;
		//1,2は無視
		if (x == 1 || x == 2) {
			System.out.println(x);
			
		}else {
		
			a = x;
			b = x * 2;
			t = b;
			for (i = 2; t <= y; i++) {
				t *= 2;
			}
			System.out.println(i-1);
		}
	}
	
	public static long gcd(long m, long n) {
		long t;
		while(m % n != 0) {
			t = n;
			n = m % n;
			m = t;
		}
		return n;
	}
	
	public static long lcm(long m, long n) {
		return m * n / gcd(m, n);
	}
	
	//aはbの倍数
	public static long func(long a, long b) {
		
	}
}


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

#include<bits/stdc++.h>
#define int long long 
using namespace std;
int n,z[1000000],d,l,r,kk,dd,ans,len;
char s[1000000];
int main(){
	scanf("%s",s);len=strlen(s);
	for (char c='a';c<='z';c++){
		d=kk=0;for (int i=0;i<len;i++){
			kk+=s[i]>=c;
			if (s[i]==c)z[++d]=kk;
		}if ((d&1)&&(kk&1)==0){puts("-1");return 0;}
		l=1;r=d;while (l<r){
			dd=min(z[l],kk-z[r]+1);
			ans+=abs(z[l]-dd)+abs(z[r]-(kk-dd+1));
			l++;r--;
		}if (l==r)ans+=abs((kk+1)/2-z[l]);
	}cout<<ans<<endl;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include<cstdio>
#include<algorithm>
#include<cmath>
#define ll long long
using namespace std;
inline void in(ll &x){x=0;char c;bool f=0;while((c=getchar())>'9'||c<'0')if(c=='-')f=!f;x=c-48;while((c=getchar())<='9'&&c>='0')x=x*10+c-48;if(f)x=-x;}
inline void out(ll x){if(x<0)putchar('-');if(x>9)out(x/10);putchar(x%10+48);}
inline void outn(ll x){out(x);printf("\n");}
int main(){
	int x,y;
	in(x);in(y);
	outn(log(y/x)/log(2)+1);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
   11 |         in(x);in(y);
      |            ^
a.cc:6:20: note:   initializing argument 1 of 'void in(long long int&)'
    6 | inline void in(ll &x){x=0;char c;bool f=0;while((c=getchar())>'9'||c<'0')if(c=='-')f=!f;x=c-48;while((c=getchar())<='9'&&c>='0')x=x*10+c-48;if(f)x=-x;}
      |                    ^
a.cc:11:18: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
   11 |         in(x);in(y);
      |                  ^
a.cc:6:20: note:   initializing argument 1 of 'void in(long long int&)'
    6 | inline void in(ll &x){x=0;char c;bool f=0;while((c=getchar())>'9'||c<'0')if(c=='-')f=!f;x=c-48;while((c=getchar())<='9'&&c>='0')x=x*10+c-48;if(f)x=-x;}
      |                    ^
Language: C++

#include<iostream>
#include<fstream>
#include<algorithm>
#include<string>
#include<cstring>

using namespace std;

int main() {
	long long int x, y;
	cin >> x >> y;

	long double z = log2l((long double)(y) / (long double)(x));
	long long int ans = (long long int)(z);
	cout << ans + 1 << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'log2l' was not declared in this scope
   13 |         long double z = log2l((long double)(y) / (long double)(x));
      |                         ^~~~~
Language: C++

#include <bits/stdc++.h>
#define PB push_back
#define FST first
#define SCD second
#define modp 1000000007
#define MODP 1000000
#define EPS 1e-7
#define INF 0x3f3f3f3f
#define MAX2 113
#define MAX3 5013
#define MAX4 10013
#define MAX5 100013
#define MAX6 2000013
#define MAXN 100013
#define MANX MAXN
using namespace std;
typedef long long LL;
typedef unsigned int UI;
const UI tb[32] = {13, 0, 27, 1, 28, 18, 23, 2, 29, 21, 19, 12, 24, 9, 14, 3, 30, 26, 17, 22, 20, 11, 8, 13, 25, 16, 10, 7, 15, 6, 5, 4};
#define LOG(x) tb[(UI(x) * (UI)263572066) >> 27]
typedef pair<int,int> PA;
typedef pair<PA,PA> PF;
typedef pair<double,double> PAf;

int n,m,tot;

struct E
{
    int a, nxt;
    // E(){}
    // E(int x, int y, int z) : a(x), nxt(y), c(z) {}
};


int main()
{
// #ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
    // freopen("out.txt", "w", stdout);
#endif
    int TT = 1;
    // scanf("%d",&TT);
    for (int ci=1;ci<=TT;++ci) {
    // while (scanf("%d", &n)!=EOF) {
        // scanf("%d", &n);
        LL X,Y;
        int cnt = 1;
        cin>>X>>Y;
        while ((X<<1)<=Y) X<<=1, ++cnt;
        cout<<cnt<<endl;

    }
    return 0;
}

Compiler output:
a.cc:40:2: error: #endif without #if
   40 | #endif
      |  ^~~~~
Language: C++

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

typedef long long ll;
ll a,b;

int main(){
	cin>>a>>b;
	if(a==1){
			puts("1");
			return 0;
		}
		else
			a=2;
	}
	printf("%lld\n",(ll)(log(b/a)/log(2))+1);
	return 0;
}


Compiler output:
a.cc:16:15: error: expected constructor, destructor, or type conversion before '(' token
   16 |         printf("%lld\n",(ll)(log(b/a)/log(2))+1);
      |               ^
a.cc:17:9: error: expected unqualified-id before 'return'
   17 |         return 0;
      |         ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

typedef long long ll;
ll a,b;

int main(){
	cin>>a>>b;
	if(a==1){
			puts("1");
			return 0;
		}
		else
			a=2;
	}
	printf("%lld\n",(ll)(log(b/a)/log(2))+1);
	return 0;
}

Compiler output:
a.cc:16:15: error: expected constructor, destructor, or type conversion before '(' token
   16 |         printf("%lld\n",(ll)(log(b/a)/log(2))+1);
      |               ^
a.cc:17:9: error: expected unqualified-id before 'return'
   17 |         return 0;
      |         ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include 
using namespace std;
 
int main() {
	unsigned long long a,b;cin>>a>>b;
	unsigned long long cnt=1;
	while(1){
		if(a*2<=b){
			cnt++;
			a*=2;
		}else break;
	}
	cout<


Compiler output:
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include
      |          ^
a.cc: In function 'int main()':
a.cc:5:32: error: 'cin' was not declared in this scope
    5 |         unsigned long long a,b;cin>>a>>b;
      |                                ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout<
      |         ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:14: error: expected primary-expression at end of input
   13 |         cout<
      |              ^
a.cc:13:14: error: expected '}' at end of input
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits\stdc++.h>

using namespace std;

typedef long long ll;

ll a,b;
int main(){
    int ans = 1;
    cin >> a >> b;
    ll tem = a;
    while(tem*2 <= b){
        tem*=2;
        ans++;
    }
    cout<<ans;

}


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

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

#define fs first
#define sc second
#define pb emplace_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()

const int32_t inf = 1001001001;
const int64_t infll = 1001001001001001001ll;
const int dx[] = {0, -1, 1, 0, -1, 1, -1, 1}, dy[] = {-1, 0, 0, 1, -1, -1, 1, 1};

template <typename T> using vector2d = vector<vector<T>>;

// clang-format off
template <typename T> void sort(vector<T> &v) { sort(all(v)); }
ostream &operator<<(ostream &os, __int128_t value) { if (ostream::sentry(os)) { __uint128_t tmp = value < 0 ? -value : value; char buffer[64]; char *d = end(buffer); do { --d; *d = "0123456789"[tmp % 10]; tmp /= 10; } while (tmp != 0); if (value < 0) { --d; *d = '-'; } int len = end(buffer) - d; if (os.rdbuf()->sputn(d, len) != len) { os.setstate(ios_base::badbit); }} return os; }
istream &operator>>(istream &is, __int128_t &value) { string in; is >> in; value = 0; for (const char &c : in) { if ('0' <= c && c <= '9') value = 10 * value + (c - '0'); } if (in[0] == '-') value *= -1; return is; }
ostream &operator<<(ostream &os, __uint128_t value) { if (ostream::sentry(os)) { char buffer[64]; char *d = end(buffer); do { --d; *d = "0123456789"[value % 10]; value /= 10; } while (value != 0); int len = end(buffer) - d; if (os.rdbuf()->sputn(d, len) != len) { os.setstate(ios_base::badbit); }} return os; }
istream &operator>>(istream &is, __uint128_t &value) { string in; is >> in; value = 0; for (const char &c : in) { if ('0' <= c && c <= '9') value = 10 * value + (c - '0'); } return is; }
template <typename T> ostream &operator<<(ostream &os, vector<T> &v) { os << v[0]; for (int i = 1; i < v.size(); ++i) os << " " << v[i]; return os; }
template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &in : v) is >> in; return is; }
template <typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p) { os << p.fs << " " << p.sc; return os; }
template <typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.fs >> p.sc; return is; }

struct IoSetup { IoSetup(){ cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); cerr << fixed << setprecision(10); } } iosetup;

inline int64_t in() { int64_t x = 0; cin >> x; return x; }
template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }
// clang-format on

signed main(int argc, char *argv[]) {
  int64_t a = in(), b = in();

  int ans = 0;
  while (a <= b) {
    a *= 2;
    ans++;
  }

  cout << ans << endl;
}


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 <bits/stdc++.h>
using namespace std;

#define fs first
#define sc second
#define pb emplace_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()

const int32_t inf = 1001001001;
const int64_t infll = 1001001001001001001ll;
const int dx[] = {0, -1, 1, 0, -1, 1, -1, 1}, dy[] = {-1, 0, 0, 1, -1, -1, 1, 1};

template <typename T> using vector2d = vector<vector<T>>;

// clang-format off
template <typename T> void sort(vector<T> &v) { sort(all(v)); }
ostream &operator<<(ostream &os, __int128_t value) { if (ostream::sentry(os)) { __uint128_t tmp = value < 0 ? -value : value; char buffer[64]; char *d = end(buffer); do { --d; *d = "0123456789"[tmp % 10]; tmp /= 10; } while (tmp != 0); if (value < 0) { --d; *d = '-'; } int len = end(buffer) - d; if (os.rdbuf()->sputn(d, len) != len) { os.setstate(ios_base::badbit); }} return os; }
istream &operator>>(istream &is, __int128_t &value) { string in; is >> in; value = 0; for (const char &c : in) { if ('0' <= c && c <= '9') value = 10 * value + (c - '0'); } if (in[0] == '-') value *= -1; return is; }
ostream &operator<<(ostream &os, __uint128_t value) { if (ostream::sentry(os)) { char buffer[64]; char *d = end(buffer); do { --d; *d = "0123456789"[value % 10]; value /= 10; } while (value != 0); int len = end(buffer) - d; if (os.rdbuf()->sputn(d, len) != len) { os.setstate(ios_base::badbit); }} return os; }
istream &operator>>(istream &is, __uint128_t &value) { string in; is >> in; value = 0; for (const char &c : in) { if ('0' <= c && c <= '9') value = 10 * value + (c - '0'); } return is; }
template <typename T> ostream &operator<<(ostream &os, vector<T> &v) { os << v[0]; for (int i = 1; i < v.size(); ++i) os << " " << v[i]; return os; }
template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &in : v) is >> in; return is; }
template <typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p) { os << p.fs << " " << p.sc; return os; }
template <typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.fs >> p.sc; return is; }

struct IoSetup { IoSetup(){ cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); cerr << fixed << setprecision(10); } } iosetup;

inline int64_t in() { int64_t x = 0; cin >> x; return x; }
template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }
// clang-format on

signed main(int argc, char *argv[]) {
  int a = in(), b = in();

  int ans = 0;
  while (a <= b) {
    a *= 2;
    ans++;
  }

  cout << ans << endl;
}


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 <iostream>
#include <utility>
#include <map>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
#include <stack>
#include <set>
#include <deque>
#include <cmath>
#include <cassert>
#include <cstring>

using namespace std;
typedef long long ll;
ll mod = 1e9+7;
#define rep(i,n) for(int i = 0; i < (n); ++i)

int main() {
    string s;
    cin >> s;
    int n = s.size()
    int ans = 0;
    for (int i = 1; i < n; ++i) {
        if (s[i] != s[i-1]) {
            ans = min(ans, max(i, n-i))
        }
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:5: error: expected ',' or ';' before 'int'
   24 |     int ans = 0;
      |     ^~~
a.cc:27:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   27 |             ans = min(ans, max(i, n-i))
      |             ^~~
      |             abs
a.cc:30:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   30 |     cout << ans << endl;
      |             ^~~
      |             abs