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

#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <ctype.h>

char s[100010];
int buf[100010];
int ind;

int main(void)
{
  int l,run,i,j;
  fgets(s,100010,stdin);
  
  ind = 0;
  l = strlen(s);
  for(i=0;i<l;){
    for(j=i;j<l;j++){
      if(s[i]!=s[j]) break;
    }
    run = j-i;
    buf[ind++] = run;
    i += run;
  }
  int min_v = 1000000000;
  for(i=0;i<ind-1;i++){
    int v1,v2;
    v1 = v2 = 0;
    for(j=0;j<=i;j++){
      v1 += buf[j];
    }
    for(j=i+1;j<ind;j++){
      v2 += buf[j];
    }
    int v = (v1 > v2 ? v1:v2);
    if( v < min_v) min_v = v;
  }
  printf("%d\n",v);
  return EXIT_SUCCESS; 
}



Compiler output:
main.c: In function 'main':
main.c:39:17: error: 'v' undeclared (first use in this function)
   39 |   printf("%d\n",v);
      |                 ^
main.c:39:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<string>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<functional>
#include<map>
using namespace std;
typedef long long ll;
int main()
{
	string s;int res=100005;
	cin>>s;0101001
	int n=s.length();
	for(int i=0;i<n-1;i++)
		if(s[i]!=s[i+1])
		{
			int m=max(i+1,n-i-1);
			if(m<res)res=m;
		}
	cout<<res<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:23: error: expected ';' before 'int'
   16 |         cin>>s;0101001
      |                       ^
      |                       ;
   17 |         int n=s.length();
      |         ~~~            
a.cc:18:23: error: 'n' was not declared in this scope
   18 |         for(int i=0;i<n-1;i++)
      |                       ^
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int main() {
  char c, cp;
  int ans;
  int count=0;
  int len[100000];
  int sum=0, psum=0;
  int ind=0;
  int temp;
  while(c!='0'&&c!='1'){
    scanf("%c", &c);
  }
  cp=c;
  count=1;
  sum++;
  while(cin>>c){
    if(c=='0' || c=='1'){
      sum++;
      if(c!=cp){
        cp=c;
        len[ind]=count;
        count=1;
        ind++;
      }else{
        count++;
      }
    }
  }
  len[ind]=count;
  an=sum;
  for(int i=0; i<ind;i++){
    psum+=len[i];
    temp=(sum-psum<psum)?psum:sum-psum;
    ans=(ans<temp) ? ans :temp;
  }
  printf("%d\n", ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:3: error: 'an' was not declared in this scope; did you mean 'ans'?
   34 |   an=sum;
      |   ^~
      |   ans
Language: C++

#include <vector> 
#include <list> 
 #include <map>
 #include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
#include <limits>
using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << '=' << (x) << endl;
#define debug(x) cerr << #x << '=' << (x) << '('<<'L' << __LINE__ << ')' << ' ' << __FILE__ << endl;


string S;
int sizeS;
int calc(){

    if(S.find("1")==string::npos){return 0;}
    int ans=INT_MAX;

    for(int i=0;i<sizeS-2;i++){
        if(S[i]!=S[i+1]){
            ans=min(ans,max(i+1,sizeS-1-i) );
        }
    }
    return ans;

}


int main(){
    
    cin>>S;
    sizeS=S.size();
    int ans=sizeS;
    ans=calc();
    cout<<ans<<endl;

}


Compiler output:
a.cc: In function 'int calc()':
a.cc:77:13: error: 'INT_MAX' was not declared in this scope
   77 |     int ans=INT_MAX;
      |             ^~~~~~~
a.cc:23:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   22 | #include <queue>
  +++ |+#include <climits>
   23 | #include <limits>
Language: C++

#include <vector> 
#include <list> 
 #include <map>
 #include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << '=' << (x) << endl;
#define debug(x) cerr << #x << '=' << (x) << '('<<'L' << __LINE__ << ')' << ' ' << __FILE__ << endl;


string S;
int sizeS;
int calc(){

    if(S.find("1")==string::npos){return 0;}
    int ans=INT_MAX;

    for(int i=0;i<sizeS-2;i++){
        if(S[i]!=S[i+1]){
            ans=min(ans,max(i+1,sizeS-1-i) );
        }
    }
    return ans;

}


int main(){
    
    cin>>S;
    sizeS=S.size();
    int ans=sizeS;
    ans=calc();
    cout<<ans<<endl;

}


Compiler output:
a.cc: In function 'int calc()':
a.cc:76:13: error: 'INT_MAX' was not declared in this scope
   76 |     int ans=INT_MAX;
      |             ^~~~~~~
a.cc:23:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   22 | #include <queue>
  +++ |+#include <climits>
   23 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long INF = 123456789;
const long long MOD = 1000000007;
const long double PI = 3.1415926;
#define FOR(i, r, n) for (ll i = (ll)(r); i < (ll)(n); i++)
#define RFOR(i, r, n) for (ll i = (ll)(n - 1); i >= r; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define RALL(x) x.rbegin(), x.rend()
typedef long long int ll;
typedef vector<ll> vi;
typedef vector<pair<ll, ll>> vp;
typedef vector<string> vs;
typedef vector<char> vc;
typedef list<ll> lst;

ll n, m, k, ans = 0, sum = 0, cnt = 0;
string s;
char c;

#define Endl endl

/*--------------------template--------------------*/

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

Compiler output:
a.cc: In function 'int main()':
a.cc:33:28: error: no matching function for call to 'max(ll, long long unsigned int)'
   33 |             ans=min(ans,max(i+1,s.size()-(i+1)));
      |                         ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:33:28: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long unsigned int')
   33 |             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:
/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:33:28: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   33 |             ans=min(ans,max(i+1,s.size()-(i+1)));
      |                         ~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include<cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define  LL long long
const double pi = acos(-1);
const double g = -9.8;
const int maxn = 1e5+555;
 
int main()
{
	char s[maxn];
	scanf("%s",s);
	int ll=strlen(s);
	int ans=ll/2;
	int l,r;
	while(1){
		l=ll-ans;
		r=ans+1;
		int flag=1;
		int now=s[l-1];
		for(int i=l;i<r;i++){
			if(s[i]!=now){
				flag=0;
				break;
			}
		}
		if(!flag){
			break;
		}
		ans++;
	}
	printf("%d\n",ans);
}

Compiler output:
a.cc:7:19: error: 'acos' was not declared in this scope
    7 | const double pi = acos(-1);
      |                   ^~~~
Language: C++

s = raw_input()
if len(s) & 1:
    l = len(s) / 2 - 1
    r = len(s) / 2
    res = len(s) / 2
    while r < len(s) and l >= 0 and s[l] == s[r]:
        l -= 1
        r += 1
        res += 1
    print res
else:
    l = len(s) / 2 - 1
    r = len(s) / 2 + 1
    res = len(s) / 2 + 1
    if s[len(s) / 2] != s[l] or s[len(s) / 2] != s[r]:
        print res
    else:
        while r < len(s) and l >= 0 and s[l] == s[r]:
            l -= 1
            r += 1
            res += 1
        print res

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = raw_input()
      | ^
Language: C++

#include <iostream>
#include <string>
#include <vector>

struct kukan
{
	int start;
	int end;
};

void flip(std::string &str, int l, int r)
{
	for (int i = l; i <= r; ++i)
		if (str[i] == '0')
			str[i] = '1';
		else
			str[i] = '0';
}

bool check(std::string &str)
{
	for (int i = 0; i < str.length() ; ++i)
	{
		if (str[i] == '1')
			return false;
	}
	return true;
}

int main()
{
	std::string str;
	std::cin >> str;



	for (int i = str.length()-1; i > 0; --i)
	{
		std::vector<kukan> kukan_list;
		for (int j = 0; j + i < str.length(); j++)
		{
			kukan_list.push_back(kukan{ j, j + i });
		}

		int len = kukan_list.size();
		long long indicator = pow(2, len) -1;

		for (; indicator >= 0; --indicator)
		{
			int ind = indicator;
			for (int k = 0; k < len; k++)
			{
				if (ind & 0b1 == 0b1)
				{
					flip(str, kukan_list[k].start, kukan_list[k].end);
					if (check(str))
					{
						std::cout << i+1;
						return 0;
					}
				}
			}
		}
		
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:39: error: 'pow' was not declared in this scope
   46 |                 long long indicator = pow(2, len) -1;
      |                                       ^~~
Language: C

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

int descending_compare(const void *a, const void *b){
    return (int)(*(int*)b - *(int*)a);
}

int ascending_compare(const void *a, const void *b){
    return (int)*(int*)a - *(int*)b;
}

char input[100005];

int main(void){
    int i;
    scanf("%s", input);
    int cnt = 0;
    int cnt2 = 0;
    for (i = 0; i < 100005; i++){
        if (input[i] == '0'){
            cnt++;
        }
        if (input[i] == '1'){
            cnt2++;
        }
    }

    if (cnt > cnt2){
        printf("%d", cnt)
    }else{
        printf("%d\n", cnt2);
    }


    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:31:26: error: expected ';' before '}' token
   31 |         printf("%d", cnt)
      |                          ^
      |                          ;
   32 |     }else{
      |     ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:32: error: no matching function for call to 'max(int&, std::__cxx11::basic_string<char>::size_type)'
   10 | if(s[i]!=s[i-1])ans=min(ans,max(i,s.size()-i));
      |                             ~~~^~~~~~~~~~~~~~
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:10:32: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   10 | if(s[i]!=s[i-1])ans=min(ans,max(i,s.size()-i));
      |                             ~~~^~~~~~~~~~~~~~
/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:2:
/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:10:32: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   10 | if(s[i]!=s[i-1])ans=min(ans,max(i,s.size()-i));
      |                             ~~~^~~~~~~~~~~~~~
Language: C

#include <stdio.h>
#include<string>

int main(){
	char s[100000];
	int i,k=0,ren=1;
	
	scanf("%s",s);
	
	for(i=1;i<strlen(s);i++){
		if(s[i]==s[i+1])
			ren++;
		if(s[i]!=s[i+1]){
			if(ren>k){
				k=ren;
			}
			ren=1;
		}
	}
	if(s[0]==s[strlen(s)-1])
		k++;
	printf("%d",k);
	return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:32: error: no matching function for call to 'max(int&, std::__cxx11::basic_string<char>::size_type)'
    8 | if(s[i-1]!=s[i])ans=min(ans,max(i,s.size()-i));
      |                             ~~~^~~~~~~~~~~~~~
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:8:32: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
    8 | if(s[i-1]!=s[i])ans=min(ans,max(i,s.size()-i));
      |                             ~~~^~~~~~~~~~~~~~
/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
Language: C++

str = input()

#要素をリストへ
s = []
for i in range(len(str)):
    s.append(str[i])

#リストを調べる
sep = 0
one = 0
zero = 0
if s[len(str) - 1] == '1':
        one += 1

if s[len(str) - 1] == '0':
        zero += 1

for i in range(len(str) - 1):
    #一の個数をカウント
    if s[i] == '1':
        one += 1
    #０の個数をカウント
    if s[i] == '0':
        zero += 1
    
    #入れ替わりの回数をカウント
    if s[i] != s[i+1]:
        sep += 1


#集計
#全部
if sep == 0:
    print(len(str))
#分かれてる
elif sep == 1:
    if one >= zero:
        print(one)
    else:
        print(zero)

#それ以外
else:
    print(len(str) - 1)


Compiler output:
a.cc:3:2: error: invalid preprocessing directive #\U00008981\U00007d20\U00003092\U000030ea\U000030b9\U000030c8\U00003078
    3 | #要素をリストへ
      |  ^~~~~~~~~~~~~~
a.cc:8:2: error: invalid preprocessing directive #\U000030ea\U000030b9\U000030c8\U00003092\U00008abf\U00003079\U0000308b
    8 | #リストを調べる
      |  ^~~~~~~~~~~~~~
a.cc:19:6: error: invalid preprocessing directive #\U00004e00\U0000306e\U0000500b\U00006570\U00003092\U000030ab\U000030a6\U000030f3\U000030c8
   19 |     #一の個数をカウント
      |      ^~~~~~~~~~~~~~~~~~
a.cc:22:6: error: invalid preprocessing directive #\U0000ff10\U0000306e\U0000500b\U00006570\U00003092\U000030ab\U000030a6\U000030f3\U000030c8
   22 |     #０の個数をカウント
      |      ^~~~~~~~~~~~~~~~~~
a.cc:26:6: error: invalid preprocessing directive #\U00005165\U0000308c\U000066ff\U0000308f\U0000308a\U0000306e\U000056de\U00006570\U00003092\U000030ab\U000030a6\U000030f3\U000030c8
   26 |     #入れ替わりの回数をカウント
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:31:2: error: invalid preprocessing directive #\U000096c6\U00008a08
   31 | #集計
      |  ^~~~
a.cc:32:2: error: invalid preprocessing directive #\U00005168\U000090e8
   32 | #全部
      |  ^~~~
a.cc:35:2: error: invalid preprocessing directive #\U00005206\U0000304b\U0000308c\U00003066\U0000308b
   35 | #分かれてる
      |  ^~~~~~~~~~
a.cc:42:2: error: invalid preprocessing directive #\U0000305d\U0000308c\U00004ee5\U00005916
   42 | #それ以外
      |  ^~~~~~~~
a.cc:1:1: error: 'str' does not name a type
    1 | str = input()
      | ^~~
Language: C++

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

typedef long long LL;
const int Maxn=1e5+5;
char a[Maxn+5];

int main(){
	gets(a);
	int l=strlen(a);
	int ans=0;
	for(int i=0;i<l;i++){
		if(a[i]=='0')	ans++;
	}
	printf("%d\n",ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   14 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

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

string s;

int ans;

int main(void){
    // Here your code !
    cin >> s;

    bool all1 = true;
    for (int i = 0; i < s.size(); ++i) {
      all1 &= (s[i] == '1');
    }
    if (all1) {
      printf("%d", s.size());
      return 0;
    }

    for (int i = 0; i < s.size(); ++i) {
      if (s[i] == '0') ans++;
    }

    int minNumChank0 = (int)1e5 + 5;
    int last;
    int temp = 0;

    last = 1;
    for (int i = 0; i < s.size(); ++i) {
      if ((last == '0' || last == '1') && s[i] == '0') temp++;
      if (last == '0' && s[i] == '1') {minNumChank0 = min(minNumChank0, temp); temp = 0;}
      last = s[i];
    }

    printf("%d\n", mix(ans, minNumChank0));
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:20: error: 'mix' was not declared in this scope
   36 |     printf("%d\n", mix(ans, minNumChank0));
      |                    ^~~
Language: C++

#include <iostream>

using namespace std;

int main() {
	unsigned char s[100005];
	cin >> s;
	int n = strlen((const char*)s);

	unsigned int *l=new unsigned int[n];
	int size = 0;
	{
		int p = -1;
		unsigned char pre = 'a';
		for (int i = 0; i < n; i++) {
			if (s[i] != pre) {
				size++;
				pre = s[i];

				p++;
				l[p]=1;
			}
			else {
				l[p]++;
			}
		}
	}

	int a = 0,b = n;
	int M = n;
	for (int i = 0; i < size; i++) {
		int t = (a < b) ? b : a;
		if (t < M) {
			M = t;
		}
		a += l[i];
		b -= l[i];
	}

	delete[] l;

	cout << M << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'strlen' was not declared in this scope
    8 |         int n = strlen((const char*)s);
      |                 ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>  
#include <cstdio>  
#include <cstring>  
#include <algorithm>  
#include <cmath>
#include <cstdlib>
#include <map>

using namespace std;  
typedef long long ll;
char s[10000];
int main()
{
	//string s;
	while(gets(s) != NULL)
	{
		int l = strlen(s);
		int k = 0;
		for(int i = 0; i < l; i++)
		{
			if(s[i] == '0')
				k++;
		}
		printf("%d\n", k);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'gets' was not declared in this scope; did you mean 'getw'?
   15 |         while(gets(s) != NULL)
      |               ^~~~
      |               getw
Language: C++

////////////////////////////////////////////////
//                                            //
//  Author: Muhammad Faishol Amirul Mukminin  //
//                                            //
////////////////////////////////////////////////
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pi;
typedef pair<pi,int> pii;
typedef pair<ll,ll> pl;
typedef pair<pl,ll> pll;
typedef pair<double,double> pd;
typedef pair<pd,double> pdd;

#define fi first
#define se second
#define PUB push_back
#define POB pop_back
#define PUF push_front
#define POF pop_front
#define ALL(v) (v).begin(),(v).end()
#define endl "\n"

const double EPS = 1e-9;
const double PI = acos(-1);

const ll MOD = 1e9+7;

const int dCol[] = {0,+1,0,-1,+1,+1,-1,-1};
const int dRow[] = {-1,0,+1,0,-1,+1,+1,-1};

string S;

bool valid(ll ang){
	ll res=0;
	while(ang>0){
		res += ang%10;
		ang /= 10;
	}

	if(A <= res && res <= B) return 1;
	else return 0;
}

// ^r log Un/a = ^(n-1)

int main(){
	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	int ans=0,satu=0,nol=0;
	cin >> S;
	int l1=-1, l0=0;
	for(int i=0;i<S.length();i++){
		//hitung 1 berjejer
		if(S[i]=='1' && l1==-1){
			l1 = i;
		}else if(l1 != -1 && S[i]=='0'){
			satu = max(satu, i-l1);
			l1= -1;
		}

		//hitung 0 berjejer
		if(S[i]=='0' && l0==-1){
			l0 = i;
		}else if(l0 != -1 && S[i]=='1'){
			nol = max(nol, i-l0);
			l0= -1;
		}
	}

	if(l1 != -1){
		satu = max(satu, N-l1);
	}

	if(l0 != -1){
		nol = max(nol, N-l0);
	}

	ans = max((int) (ans+1)/2, max(satu, nol));

	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'bool valid(ll)':
a.cc:44:12: error: 'A' was not declared in this scope
   44 |         if(A <= res && res <= B) return 1;
      |            ^
a.cc:44:31: error: 'B' was not declared in this scope
   44 |         if(A <= res && res <= B) return 1;
      |                               ^
a.cc: In function 'int main()':
a.cc:74:34: error: 'N' was not declared in this scope
   74 |                 satu = max(satu, N-l1);
      |                                  ^
a.cc:78:32: error: 'N' was not declared in this scope
   78 |                 nol = max(nol, N-l0);
      |                                ^
a.cc: In function 'bool valid(ll)':
a.cc:46:1: warning: control reaches end of non-void function [-Wreturn-type]
   46 | }
      | ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;

int main(){
  char input[100000];
  scanf("%s",input);
  int countZ = 0;
  for(int x = 0; x < strlen(input);x++){
    if(input[x] == '0'){
      countZ++;
    }
  }
  printf("%d\n", countZ);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'strlen' was not declared in this scope
    9 |   for(int x = 0; x < strlen(input);x++){
      |                      ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <deque>

using namespace std;

int main(int argc, char const *argv[])
{
	string s;
	int res = 0;

	cin >> s;

	for (int i = 0; i < s.size(); ++i)
	{
		if (s[i]=="0") res++;
	}

	cout << res << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:20:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |                 if (s[i]=="0") res++;
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <set>
#include <map>

using namespace std;

char s[10005];

int main()
{
	int flag = 0;
	gets(s);
	int len = strlen(s);
	for(int i = 0 ; i < len ; i++){
		if(s[i] == '0') flag++;
	}
	cout << flag << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   18 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define il inline
#define outy printf("Yes\n")
#define outn printf("No\n")
#define outf printf("First\n")
#define outs printf("Second\n")
#define FOR(a,b,c) for(int a=b;a<=c;a++)
#define FORD(a,b,c) for(int a=b;a>=c;a--)
#define FORL(a,b) for(int a=head[b];a;a=nxt[a])
#define in(a)  a=read()
#define in2(a,b)  a=read(),b=read()
#define in3(a,b,c)  a=read(),b=read(),c=read()
#define in4(a,b,c,d)  a=read(),b=read(),c=read(),d=read()
#define inl(a)  a=readl()
#define inl2(a,b)  a=readl(),b=readl()
#define inl3(a,b,c)  a=readl(),b=readl(),c=readl()
#define inl4(a,b,c,d)  a=readl(),b=readl(),c=readl(),d=readl()
#define out(a) printf("%d\n",a)
#define out2(a,b) printf("%d %d\n",a,b)
#define out3(a,b,c) printf("%d %d %d\n",a,b,c)
#define out4(a,b,c,d) printf("%d %d %d %d\n",a,b,c,d)
#define outl(a) printf("%lld\n",a)
#define outl2(a,b) printf("%lld %lld\n",a,b)
#define outl3(a,b,c) printf("%lld %lld %lld\n",a,b,c)
#define outl4(a,b,c,d) printf("%lld %lld %lld %lld\n",a,b,c,d)
#define clr(x,y) memset(x,y,sizeof(x))
inline int read(){
    char c;int s=0,t=1;
    while(!isdigit(c=getchar()))if(c=='-')t=-1;
    do{s=s*10+c-'0';}while(isdigit(c=getchar()));
    return s*t;
}
inline ll readl(){
    char c;ll s=0;int t=1;
    while(!isdigit(c=getchar()))if(c=='-')t=-1;
    do{s=s*10+c-'0';}while(isdigit(c=getchar()));
    return s*t;
}
/*------------------------------------------------------------*/
#define mod 1000000000
#define maxn 110
#define inf 0x7fffffff
/*------------------------------------------------------------*/
char s[100010];
int main(){
	scanf("%s",s);
	int n=strlen(s); 
	if(s[0]=='0'){
		FOR(i,0,n-1)
			if(s[i]=='1')s[i]='0';
			 else s[i]='1';
	}
	int k=0;
	int ans=n;
	int k1=0;
	FOR(i,0,n-1){
		if(s[i]=='1'){
			if(s[i-1]=='0'){
				ans=min(ans,max(k,k1));
				k-=k1;
			}
			k++;k1++;
		}
		 else {
		 	k++;
		 }
	}
	if(s[n-1]=='0')ans=min(ans,max(k-k1,k1);
	out(ans);
		
}

Compiler output:
a.cc: In function 'int main()':
a.cc:70:48: error: expected ')' before ';' token
   70 |         if(s[n-1]=='0')ans=min(ans,max(k-k1,k1);
      |                               ~                ^
      |                                                )
Language: Java

import java.util.*;

public class WideFlip {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    char[] arrayS = S.toCharArray();
    int lenS = arrayS.length;
    int K = 0;
    for(int i = 0; i < lenS; i++) {
      if(arrayS[i] == '0') {
        K++;
      }
    }
    System.out.println(K);
  }
}


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

#include<cstdio>
#include<cstring>
#define chkmin(a,b) ((a)<(b)?(a):(b))
#define chkmax(a,b) ((a)>(b)?(a):(b))
#define f(i,a,b) for(register int i=(a);i<=(b);i=-(~(i)))
char s[100010];
int ans1=n,ans2=n;
int main()
{
	scanf("%s",s+1);
	int n=strlen(s+1);
	f(i,1,n)
	{
		if(s[i]=='0')ans1=chkmin(ans1,chkmax(n-i+1-1,i-1));
		else ans2=chkmin(ans2,chkmax(n-i+1-1,i-1));
	}return printf("%d\n",chkmax(ans1,ans2)),0;
} 

Compiler output:
a.cc:7:10: error: 'n' was not declared in this scope
    7 | int ans1=n,ans2=n;
      |          ^
a.cc: In function 'int main()':
a.cc:12:11: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   12 |         f(i,1,n)
      |           ^
a.cc:5:35: note: in definition of macro 'f'
    5 | #define f(i,a,b) for(register int i=(a);i<=(b);i=-(~(i)))
      |                                   ^
a.cc:15:22: error: 'ans2' was not declared in this scope; did you mean 'ans1'?
   15 |                 else ans2=chkmin(ans2,chkmax(n-i+1-1,i-1));
      |                      ^~~~
      |                      ans1
a.cc:16:43: error: 'ans2' was not declared in this scope; did you mean 'ans1'?
   16 |         }return printf("%d\n",chkmax(ans1,ans2)),0;
      |                                           ^~~~
a.cc:4:27: note: in definition of macro 'chkmax'
    4 | #define chkmax(a,b) ((a)>(b)?(a):(b))
      |                           ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 100000005
#define MAX 100001
#define fi first
#define se second
using namespace std;
//__gcd(a,b), __builtin_popcount(a);

int main(){
	int ans1 = 0, ans2 = 0;
	string str;
	cin >> str;
	for(int i = 0;i < str.size();i++){
		if(str[i] == '0')ans++;
		else ans2++;
	}
	cout << max(ans1, ans2) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:34: error: 'ans' was not declared in this scope; did you mean 'ans2'?
   16 |                 if(str[i] == '0')ans++;
      |                                  ^~~
      |                                  ans2
Language: C++

#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int const maxn=1e5+5;
char s[maxn];
int a[maxn],c[maxn],b[maxn];
int main()
{
    gets(s);
    int n=strlen(s);
    for(int i=0;i<=n;i++)
    a[i]=s[i]-'0';
    int res=0,temp=a[0];
    int j=0,l=0;
    for(int i=1;i<n;i++)
    if(a[i]!=temp)
    {
        temp=a[i];
        c[l++]=i-j;
        j=i;
    }
    c[l++]=n-j;
    if(l==2) printf("%d\n",max(c[0],c[1]));
    else
    {
        for(int i=0;i<l-1;i++)
        b[i]=c[i]+c[i+1];
        int res=b[0];
        for(int i=1;i<l-1;i++)
        res=min(b[i],res);
        printf("%d\n",res);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main()
{
	string S;
	cin >> S;
	int zero_c = 0;
	int one_c = 0;
	for(int i = 0;i < S.size();i++)
	{
		if(S[i] == '0') zero_c++;
		else one_c++;
	}

	cout << max(zero_c,one_c) << endl;
	return 0;
}
kutimoti@kutimoti-surface

Compiler output:
a.cc:20:9: error: stray '@' in program
   20 | kutimoti@kutimoti-surface
      |         ^
a.cc:20:1: error: 'kutimoti' does not name a type
   20 | kutimoti@kutimoti-surface
      | ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
#define INF 2000000000
#define MOD 1000000007
#define EPS (1e-10)

using namespace std;

int main(int argc, char *argv[]) {
	
	double X,Y; cin >> X >> Y;

	//double k = log2(Y/X) + 1;
	//cout << floor(k) << endl;

	int ans = 0;
	while(X <= Y) {
		X *= 2;
		ans++;
	}ansans
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:19:10: error: 'ansans' was not declared in this scope
   19 |         }ansans
      |          ^~~~~~
Language: C++

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

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


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

#include<bits/stdc++.h>
#include<cmath>
#include<string>
using namespace std;
int main(){
    long x,y;
    cin>>X>>Y;
    long A=X;
    int ans=0;
    while(A<=Y){
        ans++;
        A*=2;
    }
    cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'X' was not declared in this scope
    7 |     cin>>X>>Y;
      |          ^
a.cc:7:13: error: 'Y' was not declared in this scope
    7 |     cin>>X>>Y;
      |             ^
Language: C++

#include<bits/stdc++.h>
#include<cmath>
#include<string>
using namespace std;
int main(){
    long x,y;
    cin>>X>>Y;
    long A=X;
    int ans=0;
    while(A<=Y){
        ans++;
        a*=2;
    }
    cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'X' was not declared in this scope
    7 |     cin>>X>>Y;
      |          ^
a.cc:7:13: error: 'Y' was not declared in this scope
    7 |     cin>>X>>Y;
      |             ^
a.cc:12:9: error: 'a' was not declared in this scope
   12 |         a*=2;
      |         ^
Language: C++

def myAnswer(X:int,Y:int) -> int:
   if(X*2 > Y): return 0
   ans = X
   total = 1
   while True:
      ans *= 2
      if(ans > Y):
         break
      else:
         total += 1
   return total


def modelAnswer():
   tmp=1
def main():
   X, Y = map(int,input().split())
   print(myAnswer(X,Y))
if __name__ == '__main__':
   main()

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

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

int main(){
    ll x,y;
    cin >> x >> y;
    ll cnt=0;
    while(x<=y){
        tmp*=2;
        cnt++;
    }
    cout << cnt << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   10 |         tmp*=2;
      |         ^~~
      |         tm
Language: C++

def solve():
    x,y = map(int,input().split())
    cnt = 0
    while x<=y:
        x*=2
        cnt+=1
    print(cnt)
if __name__=='__main__':
    solve()

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


// Problem : C - Multiple Gift
// Contest : AtCoder Regular Contest 088
// URL : https://atcoder.jp/contests/arc088/tasks/arc088_a
// Memory Limit : 256 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define cerr if(1)cerr
#define size(x) (int)x.size()
#define all(x) x.begin(), x.end()

const int N = 1e6 + 1, mod = 1e9 + 7, inf = 2e9;

ll x, y;

int main() { cin.tie(0)->sync_with_stdio(0);
	cin >> x >> y;
	cout << int(__lg( / x)) + 1;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: expected primary-expression before 'int'
   22 |         cout << int(__lg( / x)) + 1;
      |                 ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define lli long long int
#define REP(i,s,n) for(int i=s;i<n;i++)
#define MOD 1000000007
#define NUM 2520
#define INF (1LL<<50)
#define DEBUG 0
#define mp(a,b) make_pair(a,b)
#define SORT(V) sort(V.begin(),V.end())
#define PI (3.141592653589794)

#define P pair<lli,lli>

signed main(){

	lli x,y;
	cin>>x>>y;

	lli cnt=0;
	while(x<=ay){
		x*=2;
		cnt++;
	}
	cout<<cnt<<endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: 'ay' was not declared in this scope; did you mean 'y'?
   23 |         while(x<=ay){
      |                  ^~
      |                  y
Language: C++

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
using ll=long long;
using vec=vector<ll>;
using Graph = vector<vector<ll>>;
#define loop(i,n) for(ll i=0;i<n;i++)
#define Loop(i, m, n) for(ll i = m;i < n;i++)
#define pool(i,n) for(ll i=n-1;i>=0;i--)
#define Pool(i, m, n) for(ll i=n-1;i>=m;i--)
#define MAX 99999999999ll
#define MIN -99999999999ll
#define setbit bitset<8>
#define flagcount __builtin_popcount
#define flag(x) (1<<x)
#define flagadd(bit,x) bit|=flag(x)
#define flagpop(bit,x) bit&=~flag(x) 
#define flagon(bit,i) bit&flag(i)
#define flagoff(bit,i) !(bit & (1<<i))
#define all(v) v.begin(),v.end()
#define low2way(v,x) lower_bound(all(v),x)
#define high2way(v,x) upper_bound(all(v),x)
#define count2way(v,x) high2way(v,x)-low2way(v,x)
#define lower(v,x) low2way(v,x)-v.begin() //1番左が0、もし見つから無いならｎを出力
#define higher(v,x) high2way(v,x)-v.begin()-1 //1番左が0、もし見つからないならn-1を出力（注意）
#define putout(x) cout<<x<<endl
#define Gput(a,b) G[a].push_back(b)
int main() {
  ll x,y;
  cin>>x>>y;
  ll anscount=0;
  ll now=x;
  while(now<=y){
    now*=2;
    anscount+;
  }
  putout(anscount);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:14: error: expected primary-expression before ';' token
   35 |     anscount+;
      |              ^
Language: C++

#include <cmath>
#include <limits>
#include <iostream>
using namespace std;

int main(){
    long long x, y;
    cin >> x >> y;
    cout << floor(log2(long double(y/x))) + 1 << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected primary-expression before 'long'
    9 |     cout << floor(log2(long double(y/x))) + 1 << endl;
      |                        ^~~~
Language: C++

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

int main(){
  unsigned long long int a,b,c;
  int d=0;
  cin>>a>>b;
  c=a;
  while(c<=b){
    d++;
    c*=2;
  }
  cout<<c<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: expected '}' at end of input
   13 |   cout<<c<<endl;
      |                 ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define i64 long long
#define ui64 unsigned long long
#define eps 1e-6
using namespace std;
 
int main() {
	// your code goes here
	ui64 X,Y;
	cin>>X>>Y;
	ui64 res = Y/X;
	printf("%llu\n", (ui64)log2(Y/X)+1); 
	//the sequence with max len will be of this form: X*(1,2,4,8,.. 2^k)
	
	return 0;
}#include <bits/stdc++.h>
#define i64 long long
#define ui64 unsigned long long
#define eps 1e-6
using namespace std;
 
int main() {
	// your code goes here
	ui64 X,Y;
	cin>>X>>Y;
	ui64 res = Y/X;
	printf("%llu\n", (ui64)log2(Y/X)+1); 
	//the sequence with max len will be of this form: X*(1,2,4,8,.. 2^k)
	
	return 0;
}

Compiler output:
a.cc:16:2: error: stray '#' in program
   16 | }#include <bits/stdc++.h>
      |  ^
a.cc:16:3: error: 'include' does not name a type
   16 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:22:5: error: redefinition of 'int main()'
   22 | int main() {
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main() {
      |     ^~~~
Language: C++

#include <iostream>

using ll = long long;
ll x, y, c;

int main() {
    std::cin >> x >> y
  c = 0;
  if (y < x) {
    std::cout << 0 << std::endl;
    return 0;
  }
  c = 1;
  while (y >= x) {
    x *= 2;
    c++;
  }
  std::cout << c << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected ';' before 'c'
    7 |     std::cin >> x >> y
      |                       ^
      |                       ;
    8 |   c = 0;
      |   ~
Language: C++

#include <iostream>

using ll = long long;
ll x, y, c;

int main() {
  c = 0;
  if (y < x) {
    std::cout << 0 << std::endl;
    return 0;
  }
  c = 1;
  while (x <= y) {
    x *= 2
    c++;
  }
  std::cout << c << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: expected ';' before 'c'
   14 |     x *= 2
      |           ^
      |           ;
   15 |     c++;
      |     ~
Language: C++

#include <iostream>

using ll = long long;
ll x, y, c;

int main() {
  c  = 0
  if (y < x) {
    std::cout << 0 << std::endl;
    return 0;
  }
  c = 1;
  while (x <= y) {
    x = x * x;
    c++;
  }
  std::cout << c << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected ';' before 'if'
    7 |   c  = 0
      |         ^
      |         ;
    8 |   if (y < x) {
      |   ~~
Language: C++

#include <iostream>

using ll = long long;
ll x, y, c;
c = 0;

int main() {
  if (y < x) {
    std::cout << 0 << std::endl;
    return 0;
  }
  c = 1;
  while (x <= y) {
    x = x * x;
    c++;
  }
  std::cout << c << std::endl;
}


Compiler output:
a.cc:5:1: error: 'c' does not name a type
    5 | c = 0;
      | ^
Language: C++

#include <iostream>

using ll = long long;
ll x, y, c;

c = 0;

int main() {
  c = 0;
  if (y < x) {
    std::cout << 0 << std::endl;
    return 0;
  }
  c = 1;
  while (x <= y) {
    x = x * x;
    c++;
  }
  std::cout << c << std::endl;
}

Compiler output:
a.cc:6:1: error: 'c' does not name a type
    6 | c = 0;
      | ^
Language: C++

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

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

  long long count = 1;
  long long n = x;

  while(true){
    if(x*2 <= y){
      x *= 2
      count++
    } else {
      break
    }
  }

  cout << count << endl;
  return 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 'count'
   13 |       x *= 2
      |             ^
      |             ;
   14 |       count++
      |       ~~~~~  
a.cc:16:12: error: expected ';' before '}' token
   16 |       break
      |            ^
      |            ;
   17 |     }
      |     ~       
a.cc:21:11: error: expected ';' before '}' token
   21 |   return 0
      |           ^
      |           ;
   22 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	long long int X,Y;
	cin>>X>>Y;
	long long int ans=0;
	while(X<=Y){
		X*=2;
		ans++;
	}
	court<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'court' was not declared in this scope
   11 |         court<<ans<<endl;
      |         ^~~~~
Language: C

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

long long a, b;
int ans;

int main()
{
	scanf("%lld%lld", &a, &b);
	while(b >= a)
	{
		a *= 2;
		ans++;
	}
	printf("%d\n", ans);
	return 0;
}

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

    #include <iostream>

    using namespace std;
    #include <cmath>
    #include <cstring>
    #include <cstdio>
    #include <cstdlib>
    #include <set>
    #include <malloc.h>


    int main()
    {
        long long a,b;
        scanf("%lld %lld",&a,&b);
        int ans=0;
        while(a<=b)
        {
            a*=2;
            ans++;
        }
        printf("%d",ans);

    }


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

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

int main() {
  long double x,y,a;
  cin>>x>>y;
  a=y/x;
  int count=0;
  for(a>=1;a/=2){
    count++;
  }
  cout<<count<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected ';' before ')' token
    9 |   for(a>=1;a/=2){
      |                ^
      |                ;
Language: C++

#include<iosream>
#include<math.h>
using namespace std;
int main() {
  long long X, Y;
  cin >> X >> Y;
  cout << (int)log(Y/X) + 1 << endl;
  return 0;
}

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

import java.util.Scanner;
public class MultipleGift {
public class Main {
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            long x = scanner.nextLong();
            long y = scanner.nextLong();
            long i = 1;
            long a = x;
            while (a <= y){
                a=a*2;
                i++;
            }
           System.out.println(i-1);
        }
        
}

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

import java.util.Scanner;
public class Main {
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            long x = scanner.nextLong();
            long y = scanner.nextLong();
            long i = 1;
            long a = x;
            while (a <= y){
                a=a*2;
                i++;
            }
           System.out.println(i-1);
        }

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