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

#include <iostream>

using namespace std;

 int a;
 string a;
 int main()
{
    cin >> a;
    for  (int i =1; i < a.size(); i++) {
          if (a[i] != a[i - 1]) s++;
    }
    cout << a;
    return 0;
}


Compiler output:
a.cc:6:9: error: conflicting declaration 'std::string a'
    6 |  string a;
      |         ^
a.cc:5:6: note: previous declaration as 'int a'
    5 |  int a;
      |      ^
a.cc: In function 'int main()':
a.cc:10:27: error: request for member 'size' in 'a', which is of non-class type 'int'
   10 |     for  (int i =1; i < a.size(); i++) {
      |                           ^~~~
a.cc:11:16: error: invalid types 'int[int]' for array subscript
   11 |           if (a[i] != a[i - 1]) s++;
      |                ^
a.cc:11:24: error: invalid types 'int[int]' for array subscript
   11 |           if (a[i] != a[i - 1]) s++;
      |                        ^
a.cc:11:33: error: 's' was not declared in this scope
   11 |           if (a[i] != a[i - 1]) s++;
      |                                 ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main() {
	char s[100000]={'\0'};
	gets(s);
	int len=strlen(s);
	int count=0;
	for(int i=1;i<len;i++){
		if(s[i]!=s[i-1]){
			count++;
		}
	}
	cout<<count<<endl;
	return 0;
}

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

/*g++ file.cpp -o file.out*/
/*./file.out*/

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

#define LL long long
#define Mod 1000000007
#define L_Mod 17100000013

char str[100001];

int main()
{
    int mn=0;
    cin>>str;
    for(int i=0; i<strlen(str)-1; i++)
        if(str[i]!=str{i+1})
            mn++;
    cout<<mn;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |         if(str[i]!=str{i+1})
      |            ~~~~~~^~~~~
a.cc:23:23: error: expected ')' before '{' token
   23 |         if(str[i]!=str{i+1})
      |           ~           ^
      |                       )
Language: C

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

int main(){
  char s[100010];
  int n;
  scanf("%s",s);
  n=strlen(s);
  for(int i=1;i<n;i++)
    if(s[i]!=s[i-1])
      cnt++;
  printf("%d\n",cnt);
}

Compiler output:
main.c: In function 'main':
main.c:11:7: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
   11 |       cnt++;
      |       ^~~
      |       int
main.c:11:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <string>

using namespace std;
int main(){
string s;
cin >> s;

int ans=0;
char x = s[0];
for(auto i=s.begin();i<s.end();i++){
if((*s)==x){
continue;
}else{
x=(*s);
ans++;
}
}
cout << ans;

return 0;}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: no match for 'operator*' (operand type is 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   12 | if((*s)==x){
      |     ^~
a.cc:15:4: error: no match for 'operator*' (operand type is 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   15 | x=(*s);
      |    ^~
Language: C++

#include<bits/stdc++.h>

using namespace std;

#define fi  first
#define se  second

const int   N   = 1e5 + 1;
const int   inf = 1e9 + 7;

typedef pair<int,int>   ii;

vector<int> g[N];
int n, k;
ii  L[N];
int h[N];
int ans[N];

void dfs(int u,int p)   {
	for(int v : g[u])
		if(v != p)  {
			h[v] = h[u] + 1;
			dfs(v);
		}
}

int main()  {
	ios_base::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	
	cin >> n;
	
	for(int i = 1 ; i <= n ; ++i)
		L[i] = ii(-inf,inf);
	
	for(int i = 1 ; i <  n ; ++i)   {
		int x, y;   cin >> x >> y;
		g[x].push_back(y);
		g[y].push_back(x);
	}
	
	dfs(1,0);
	
	queue<int>  q;
	
	cin >> k;
	
	int m = -1;
	
	while(k--)  {
		int u, p;   cin >> u >> p;
		L[u] = ii(p,p);
		q.push(u);
		int c = (p - h[u] + 1000000000) % 2;
		if(m = -1)  m = c;
		if(m != c)  {
			cout << "No";
			exit(0);
		}
	}
	
	while(q.size()) {
		int u = q.front();  q.pop();
		for(int v : g[u])   {
			ii  tmp = L[v];
			tmp.fi = max(tmp.fi,L[u].fi - 1);
			tmp.se = min(tmp.se,L[u].se + 1);
			if(tmp.fi > tmp.se) {
				cout << "No";
				exit(0);
			}
			if(tmp != L[v]) {
				L[v] = tmp;
				q.push(v);
			}
		}
	}
	
	cout << "Yes\n";
	for(int i = 1 ; i <= n ; ++i)   {
		cout << L[i].fi << "\n";
		for(int u : g[i])
			L[u] = ii(max(L[u].fi,L[i].fi - 1),min(L[u].se,L[i].fi + 1));
	}
}

Compiler output:
a.cc: In function 'void dfs(int, int)':
a.cc:23:28: error: too few arguments to function 'void dfs(int, int)'
   23 |                         dfs(v);
      |                         ~~~^~~
a.cc:19:6: note: declared here
   19 | void dfs(int u,int p)   {
      |      ^~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
string s;
int a[10000005]={0};
int main()
{	
	cin>>s;
	n=s.length();
	for(int i=0;i<n;i++)if(s[i]=='W')a[i]=1;
	int ans=0;
	for(int i=0;i+1<n;i++)if(a[i]!=a[i+1])ans++;
	cout<<ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'n' was not declared in this scope
   11 |         n=s.length();
      |         ^
Language: C++

#include<iostream>
#include<iomanip>
#include<map>
#include<set>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<cstring>
#include<sstream>
using namespace std;
 
#define P(p) cout<<(p)<<endl
#define rep(i,m,n) for(int i = (m); i < (int)(n); i++)
#define rrep(i,m,n) for(int i=(int)(m); i>=(int)(n); i--)
#define vsort(v) sort(v.begin(), v.end());
#define rvsort(v) sort(v.begin(), v.end(),greater<int>());
#define YES cout<<"YES"<< endl
#define NO cout<<"NO"<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl  
#define yes cout<<"yes"<<endl
#define no cout<<"no"<<endl
#define ret return
#define C(i) cin>>i
#define C2(i,j) cin>>i>>j
#define C3(i,j,k) cin>>i>>j>>k
#define C4(i,j,k,m) cin>>i>>j>>k>>m
////////////////////////////////////////////////////////////

int main(){
	string s;
	cin >> s;	
	bool f[s.size()]={};
	rep(i,0,s.size())
		if(s[i]=='W')
			f[i] = 1;
	
	int cnt = 0;
	int F = f[0];
	rep(i,1,s.size(){
		if( F != f[i] ){
			cnt++;
			F = f[i];
		}
	}
	
	P(cnt);
	ret 0;
}

Compiler output:
a.cc:52:2: error: unterminated argument list invoking macro "rep"
   52 | }
      |  ^
a.cc: In function 'int main()':
a.cc:43:9: error: 'rep' was not declared in this scope
   43 |         rep(i,1,s.size(){
      |         ^~~
a.cc:43:12: error: expected '}' at end of input
   43 |         rep(i,1,s.size(){
      |            ^
a.cc:33:11: note: to match this '{'
   33 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0);

using namespace std;

namespace std{template<class S,class T>struct hash<pair<S,T>>{size_t operator()(const pair<S,T>&p)const{return ((size_t)1e9+7)*hash<S>()(p.first)+hash<T>()(p.second);}};template<class T>struct hash<vector<T>>{size_t operator()(const vector<T> &v)const{size_t h=0;for(auto i : v)h=h*((size_t)1e9+7)+hash<T>()(i)+1;return h;}};}
template<class T>ostream& operator<<(ostream &os, const vector<T> &v){os<<"[ ";rep(i,v.size())os<<v[i]<<(i==v.size()-1?" ]":", ");return os;}template<class T>ostream& operator<<(ostream &os,const set<T> &v){os<<"{ "; for(const auto &i:v)os<<i<<", ";return os<<"}";}
template<class T,class U>ostream& operator<<(ostream &os,const map<T,U> &v){os<<"{";for(const auto &i:v)os<<" "<<i.first<<": "<<i.second<<",";return os<<"}";}template<class T,class U>ostream& operator<<(ostream &os,const pair<T,U> &p){return os<<"("<<p.first<<", "<<p.second<<")";}
void dbgprint(const string &fmt){cerr<<endl;}template<class H,class... T>void dbgprint(const string &fmt,const H &h,const T&... r){cerr<<fmt.substr(0,fmt.find(","))<<"= "<<h<<" ";dbgprint(fmt.substr(fmt.find(",")+1),r...);}
typedef long long ll;typedef vector<int> vi;typedef pair<int,int> pi;const int inf = (int)1e9;const double INF = 1e12, EPS = 1e-9;

int main(){
	cin.tie(0); cin.sync_with_stdio(0);
	string s; cin >> s;
	int a = 0;
	rep(i, s.size() - 1){
		a += a[i] != a[i + 1];
	}
	cout << a << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: invalid types 'int[int]' for array subscript
   20 |                 a += a[i] != a[i + 1];
      |                       ^
a.cc:20:31: error: invalid types 'int[int]' for array subscript
   20 |                 a += a[i] != a[i + 1];
      |                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	string s;
	cin>>s;
    cout<<s.count("BW")+s.count("WB")<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'count'
    6 |     cout<<s.count("BW")+s.count("WB")<<endl;
      |             ^~~~~
a.cc:6:27: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'count'
    6 |     cout<<s.count("BW")+s.count("WB")<<endl;
      |                           ^~~~~
Language: C++

#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <float.h>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <locale>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <wchar.h>
#include <wctype.h>
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <exception>
#include <functional>
#include <map>
#include <ios>
#include <iosfwd>
#include <istream>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <utility>
#include <vector>
#include <cwchar>
#include <cwctype>
#include <complex.h>
#include <fenv.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <tgmath.h>
#include <conio.h>
#include <numeric>
#include <list>
#include <windows.h>
#include <cfloat>
#include <climits>
#include <unordered_map>
#include <unordered_set>
using namespace std;

string s;
int pos,ans;

int main()
{
	cin>>s;
	pos=s.size()-1;
	
	while(pos>=0)
	{
		int cur=pos;
		while(s[cur]==s[pos]&&pos>=0) pos--;
		ans++;
	}
	
	cout<<ans-1;
	
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
 string s;
 cin >> s;
  char c = s[0];
  int cnt = 0:
  for (int i = 0; i < s.size(); i++){
    if(c != s[i]){
        c = s[i];
        cnt++;
    }
   cout << cnt << endl; 
}
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ',' or ';' before ':' token
    7 |   int cnt = 0:
      |              ^
a.cc:8:19: error: 'i' was not declared in this scope
    8 |   for (int i = 0; i < s.size(); i++){
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main{
 string s;
 cin >> s;
  char c = s[0];
  int cnt = 0:
  for (int i = 0; i < s.size(); i++){
    if(c != s[i]){
        c = s[i];
        cnt++;
    }
   cout << cnt << endl; 
}
}
    

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:9: error: expected primary-expression before 's'
    4 |  string s;
      |         ^
a.cc:4:9: error: expected '}' before 's'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:2: error: 'cin' does not name a type
    5 |  cin >> s;
      |  ^~~
a.cc:6:12: error: 's' was not declared in this scope
    6 |   char c = s[0];
      |            ^
a.cc:7:14: error: expected ',' or ';' before ':' token
    7 |   int cnt = 0:
      |              ^
a.cc:8:19: error: 'i' does not name a type
    8 |   for (int i = 0; i < s.size(); i++){
      |                   ^
a.cc:8:33: error: 'i' does not name a type
    8 |   for (int i = 0; i < s.size(); i++){
      |                                 ^
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main{
 string s;
 cin >> s;
  char c = s[0];
  int cnt = 0:
  for (int i = 0; i < s.size(); i++){
    if(c != s[i]){
        c = s[i];
        cnt++;
    }
   cout << cnt << endl; 
}

    

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:9: error: expected primary-expression before 's'
    4 |  string s;
      |         ^
a.cc:4:9: error: expected '}' before 's'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:2: error: 'cin' does not name a type
    5 |  cin >> s;
      |  ^~~
a.cc:6:12: error: 's' was not declared in this scope
    6 |   char c = s[0];
      |            ^
a.cc:7:14: error: expected ',' or ';' before ':' token
    7 |   int cnt = 0:
      |              ^
a.cc:8:19: error: 'i' does not name a type
    8 |   for (int i = 0; i < s.size(); i++){
      |                   ^
a.cc:8:33: error: 'i' does not name a type
    8 |   for (int i = 0; i < s.size(); i++){
      |                                 ^
Language: C++

#include <iostream>
using namespace std;
int main{
 string s;
 cin >> s;
  char c = s[0];
  int cnt = 0:
  for (int i = 0; i < s.size(); i++){
    if(c != s[i]){
        c = s[i];
        cnt++;
    }
   cout << cnt << endl; 
}

    

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:9: error: expected primary-expression before 's'
    4 |  string s;
      |         ^
a.cc:4:9: error: expected '}' before 's'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:2: error: 'cin' does not name a type
    5 |  cin >> s;
      |  ^~~
a.cc:6:12: error: 's' was not declared in this scope
    6 |   char c = s[0];
      |            ^
a.cc:7:14: error: expected ',' or ';' before ':' token
    7 |   int cnt = 0:
      |              ^
a.cc:8:19: error: 'i' does not name a type
    8 |   for (int i = 0; i < s.size(); i++){
      |                   ^
a.cc:8:33: error: 'i' does not name a type
    8 |   for (int i = 0; i < s.size(); i++){
      |                                 ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

//#define FILE_IO

int N;
char s[100005];

int main()
{
    #ifdef FILE_IO
    freopen("1.in", "r", stdin);
    freopen("1.out", "w", stdout);
    #endif

    gets(s + 1);
    N = strlen(s + 1);

    int ans = 0;
    for(int i = 1; i < N; i++)
        if(s[i] != s[i + 1])
            ans++;
    printf("%d\n", ans);

    return 0;
}


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

#include<<bits/stdc++.h>
using namespace std;
char a[100010];
int cnt, i, n;
int main()
{
    scanf("%s",a);
    n=strlen(a);
    for(i=1;i<=n;i++)
        if(a[i]!=a[i-1]) cnt++;
    printf("%d",cnt-1);
}

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

#include<stdio.h>
#include<algorithm>
using namespace std;
char a[100010];
int cnt;
int main()
{
    scanf("%s",a);
    int i,n;
    n=strlen(a);
    for(i=1;i<=n;i++)
        if(a[i]!=a[i-1]) cnt++;
    printf("%d",cnt-1);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'strlen' was not declared in this scope
   10 |     n=strlen(a);
      |       ^~~~~~
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<stdio.h>
#include<algorithm>
using namespace std;
char a[100010];
int cnt;
int main()
{
    scanf("%s",&a[1]);
    int i,n=strlen(&a[1]);
    for(i=1;i<=n;i++)
        if(a[i]!=a[i-1]) cnt++;
    printf("%d",cnt-1);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'strlen' was not declared in this scope
    9 |     int i,n=strlen(&a[1]);
      |             ^~~~~~
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++

omething came up and Saburo has to leave the game. The state of the board at this point is described by a string S. There are |S| (the length of S) stones on the board, and each character in S represents the color of the i-th (1 ≦ i ≦ |S|) stone from the left. If the i-th character in S is B, it means that the color of the corresponding stone on the board is black. Similarly, if the i-th character in S is W, it mea

Compiler output:
a.cc:1:230: error: extended character ≦ is not valid in an identifier
    1 | omething came up and Saburo has to leave the game. The state of the board at this point is described by a string S. There are |S| (the length of S) stones on the board, and each character in S represents the color of the i-th (1 ≦ i ≦ |S|) stone from the left. If the i-th character in S is B, it means that the color of the corresponding stone on the board is black. Similarly, if the i-th character in S is W, it mea
      |                                                                                                                                                                                                                                      ^
a.cc:1:234: error: extended character ≦ is not valid in an identifier
    1 | omething came up and Saburo has to leave the game. The state of the board at this point is described by a string S. There are |S| (the length of S) stones on the board, and each character in S represents the color of the i-th (1 ≦ i ≦ |S|) stone from the left. If the i-th character in S is B, it means that the color of the corresponding stone on the board is black. Similarly, if the i-th character in S is W, it mea
      |                                                                                                                                                                                                                                          ^
a.cc:1:1: error: 'omething' does not name a type
    1 | omething came up and Saburo has to leave the game. The state of the board at this point is described by a string S. There are |S| (the length of S) stones on the board, and each character in S represents the color of the i-th (1 ≦ i ≦ |S|) stone from the left. If the i-th character in S is B, it means that the color of the corresponding stone on the board is black. Similarly, if the i-th character in S is W, it mea
      | ^~~~~~~~
Language: C++

he row. Similarly to the original game of Reversi, when a white stone is placed, all black stones between the new white stone and another white stone, turn into white stones, and vice versa.

In the middle of a game, something came up and Saburo has to leave the game. The state of the board at this point is described by a string S. There are |S| (the length of S) stones on the board, and each character in S rep

Compiler output:
a.cc:1:1: error: 'he' does not name a type
    1 | he row. Similarly to the original game of Reversi, when a white stone is placed, all black stones between the new white stone and another white stone, turn into white stones, and vice versa.
      | ^~
Language: Java

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

public class plactice63C {

	private static Integer ct;
	private static Integer len;

	public static void main(String[] args) throws IOException {
		proconScan proScan = new proconScan();
		proScan.scan();

		ct = 0;
		len = proScan.backLine().length();
		Character flag=' ';
		for(Character buf:proScan.backLine().toCharArray()){
			if(flag==' ') flag=buf;
			else if(flag!=buf){
				ct++;
				flag=buf;
			}
			
		}
		System.out.println(ct);
		proScan.proconEnd();
	}
}

class proconScan {
	private BufferedReader br;
	private String inLine;
	private String[] inString;
	private Integer idx;
	private String splitChar;

	public proconScan() {
		br = new BufferedReader(new InputStreamReader(System.in));
		idx = 0;
		splitChar = " ";
	}

	public proconScan(String split) {
		br = new BufferedReader(new InputStreamReader(System.in));
		idx = 0;
		splitChar = split;
	}

	public void proconEnd() throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		br.close();
	}

	public String scan() throws IOException {
		idx = 0;
		inLine = br.readLine();
		inString = inLine.split(splitChar, 0);
		return inLine;
	}

	public Integer scanInteger1() throws IOException {
		scan();
		return Integer.parseInt(inString[0]);
	}

	public String backLine() {
		return inLine;
	}

	public String nextString() {
		return inString[idx++];
	}

	public String[] getString() {
		return inString;
	}

	public Integer nextInteger() {
		Integer num;
		try {
			num = Integer.parseInt(inString[idx++]);
		} catch (NumberFormatException e) {
			num = null;// TODO: handle exception
		}
		return num;
	}

	public Integer[] getInteger() {
		Integer[] num = new Integer[this.getLen()];

		for (int i = 0; i < this.getLen(); i++) {
			num[i] = Integer.parseInt(inString[i]);
		}

		return num;
	}

	public Float nextFloat() {
		Float num;
		try {
			num = Float.parseFloat(inString[idx++]);
		} catch (NumberFormatException e) {
			num = null;// TODO: handle exception
		}
		return num;
	}

	public Float[] getFloat() {
		Float[] num = new Float[this.getLen()];

		for (int i = 0; i < this.getLen(); i++) {
			num[i] = Float.parseFloat(inString[i]);
		}

		return num;
	}

	public Integer getLen() {
		return inString.length;
	}

	public int[] getInt() {
		int[] num = new int[this.getLen()];

		for (int i = 0; i < this.getLen(); i++) {
			num[i] = Integer.parseInt(inString[i]);
		}

		return num;
	}

}

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

import static org.hamcrest.CoreMatchers.nullValue;

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

public class Main {

	private static Integer ct;
	private static Integer len;

	public static void main(String[] args) throws IOException {
		proconScan proScan = new proconScan();
		proScan.scan();

		ct = 0;
		len = proScan.backLine().length();
		changeOthello(new StringBuilder(proScan.backLine()));
		System.out.println(ct);
		proScan.proconEnd();
	}

	public static StringBuilder changeOthello(StringBuilder board){
		Character buf = null;
		Character buf2 = null;
		StringBuilder buf3 = new StringBuilder();
		int i;
		for(i=0; i<len; i++){
			if( i==0 ) buf=board.charAt(i);
			else if(board.charAt(i)!=buf){
				ct++;
				buf2=board.charAt(i);
				for(int j=0;j<i;j++){
					buf3.append(buf2);
				}
				board.replace(0, i, buf3.toString());
				break;
			}
		}
		if(i<len){
			changeOthello(board);
		}
		return board;
	}

}

class proconScan {
	private BufferedReader br;
	private String inLine;
	private String[] inString;
	private Integer idx;
	private String splitChar;

	public proconScan() {
		br = new BufferedReader(new InputStreamReader(System.in));
		idx = 0;
		splitChar = " ";
	}

	public proconScan(String split) {
		br = new BufferedReader(new InputStreamReader(System.in));
		idx = 0;
		splitChar = split;
	}

	public void proconEnd() throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		br.close();
	}

	public String scan() throws IOException {
		idx = 0;
		inLine = br.readLine();
		inString = inLine.split(splitChar, 0);
		return inLine;
	}

	public Integer scanInteger1() throws IOException {
		scan();
		return Integer.parseInt(inString[0]);
	}

	public String backLine() {
		return inLine;
	}

	public String nextString() {
		return inString[idx++];
	}

	public String[] getString() {
		return inString;
	}

	public Integer nextInteger() {
		Integer num;
		try {
			num = Integer.parseInt(inString[idx++]);
		} catch (NumberFormatException e) {
			num = null;// TODO: handle exception
		}
		return num;
	}

	public Integer[] getInteger() {
		Integer[] num = new Integer[this.getLen()];

		for (int i = 0; i < this.getLen(); i++) {
			num[i] = Integer.parseInt(inString[i]);
		}

		return num;
	}

	public Float nextFloat() {
		Float num;
		try {
			num = Float.parseFloat(inString[idx++]);
		} catch (NumberFormatException e) {
			num = null;// TODO: handle exception
		}
		return num;
	}

	public Float[] getFloat() {
		Float[] num = new Float[this.getLen()];

		for (int i = 0; i < this.getLen(); i++) {
			num[i] = Float.parseFloat(inString[i]);
		}

		return num;
	}

	public Integer getLen() {
		return inString.length;
	}

	public int[] getInt() {
		int[] num = new int[this.getLen()];

		for (int i = 0; i < this.getLen(); i++) {
			num[i] = Integer.parseInt(inString[i]);
		}

		return num;
	}

}

Compiler output:
Main.java:1: error: package org.hamcrest does not exist
import static org.hamcrest.CoreMatchers.nullValue;
                          ^
Main.java:1: error: static import only from classes and interfaces
import static org.hamcrest.CoreMatchers.nullValue;
^
2 errors
Language: C++

input = gets.chomp
ans = 0
(input.length - 1).times {|i|
  ans += 1 if(input[i] != input[i+1])
}
puts ans

Compiler output:
a.cc:1:1: error: 'input' does not name a type; did you mean 'int'?
    1 | input = gets.chomp
      | ^~~~~
      | int
a.cc:6:1: error: 'puts' does not name a type
    6 | puts ans
      | ^~~~
Language: C++

#include <iostream>
#include <cstring>
using namespace std;
int main(void){
char s[1000000];
int count=0;
cin >> s;

for(i=0;i<strlen(s);i++){
if(s[i]!=s[i+1])count++;
}
cout << count << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'i' was not declared in this scope
    9 | for(i=0;i<strlen(s);i++){
      |     ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(void){
char s[1000000];
int count=0;
cin >> s;

for(i=0;i<strlen(s);i++){
if(s[i]!=s[i+1])count++;
}
cout << count << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'i' was not declared in this scope
    9 | for(i=0;i<strlen(s);i++){
      |     ^
a.cc:9:11: error: 'strlen' was not declared in this scope
    9 | for(i=0;i<strlen(s);i++){
      |           ^~~~~~
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 | #include <string>
Language: C++

#include <iostream>
#include <string>
int main(void){
char s[1000000];
int count=0;
cin >> s;

for(i=0;i<strlen(s);i++){
if(s[i]!=s[i+1])count++;
}
cout << count << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 | cin >> s;
      | ^~~
      | 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:8:5: error: 'i' was not declared in this scope
    8 | for(i=0;i<strlen(s);i++){
      |     ^
a.cc:8:11: error: 'strlen' was not declared in this scope
    8 | for(i=0;i<strlen(s);i++){
      |           ^~~~~~
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 | #include <string>
a.cc:11:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 | cout << count << 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:11:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 | cout << count << 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: Java

public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String input = scan.nextLine();
        
        char[] input_char = input.toCharArray();
        
        char current_char = input_char[0];
        int count = 0;
        for (int i=1;i<input_char.length;i++) {
            if (input_char[i]!=current_char) {
                count++;
                current_char = input_char[i];
            }
        }
        
        System.out.println(count);
    }

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

import java.util.Scanner;

public class Reversi {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String input = scan.nextLine();
        
        char[] input_char = input.toCharArray();
        
        char current_char = input_char[0];
        int count = 0;
        for (int i=1;i<input_char.length;i++) {
            if (input_char[i]!=current_char) {
                count++;
                current_char = input_char[i];
            }
        }
        
        System.out.println(count);
    }
}


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


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

int main(){
	
	long count;
	long s_number;
	int i;
	char S[100000];
	int color,lastcolor;
	
	scanf(%c,&S);
	s_number = strlen(S);
	
	if(S[0]=="B")lastcolor=0;
	else if(S[0]=="W")lastcolor=1;
	
	for (i=1;i<s_number;i++){
		if(S[i] == "B"){
			color=0;
		}
		else if(S[i]=="W"){
			color=1;
		}
		
		if(lastcolor==color){
			count++;
		}
		else{
		}
		
		lastcolor = color;
	}
	
	printf(%d,count);
	
	
	
	
}



Compiler output:
main.c: In function 'main':
main.c:13:15: error: expected expression before '%' token
   13 |         scanf(%c,&S);
      |               ^
main.c:16:16: warning: comparison between pointer and integer
   16 |         if(S[0]=="B")lastcolor=0;
      |                ^~
main.c:17:21: warning: comparison between pointer and integer
   17 |         else if(S[0]=="W")lastcolor=1;
      |                     ^~
main.c:20:25: warning: comparison between pointer and integer
   20 |                 if(S[i] == "B"){
      |                         ^~
main.c:23:29: warning: comparison between pointer and integer
   23 |                 else if(S[i]=="W"){
      |                             ^~
main.c:36:16: error: expected expression before '%' token
   36 |         printf(%d,count);
      |                ^
Language: C


#include <stdio.h>

int main(){
	
	long count;
	long s_number;
	int i,;
	char S[];
	
	scanf(%c,&S);
	s_number = strlen(S);
	
	if(S[0]=="B")lastcolor=0;
	else if(S[0]=="W")lastcolor=1;
	
	for (i=1;i<s_number;i++){
		if(S[i] == "B"){
			color=0;
		}
		else if(S[i]=="W"){
			color=1;
		}
		
		if(lastcolor==color){
			count++;
		}
		else{
		}
		
		lastcolor = color;
	}
	
	printf(%d,count);
	
	
	
	
}



Compiler output:
main.c: In function 'main':
main.c:8:15: error: expected identifier or '(' before ';' token
    8 |         int i,;
      |               ^
main.c:9:14: error: array size missing in 'S'
    9 |         char S[];
      |              ^
main.c:11:15: error: expected expression before '%' token
   11 |         scanf(%c,&S);
      |               ^
main.c:12:20: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
   12 |         s_number = strlen(S);
      |                    ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strlen'
    2 | #include <stdio.h>
  +++ |+#include <string.h>
    3 | 
main.c:12:20: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
   12 |         s_number = strlen(S);
      |                    ^~~~~~
main.c:12:20: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:14:16: warning: comparison between pointer and integer
   14 |         if(S[0]=="B")lastcolor=0;
      |                ^~
main.c:14:22: error: 'lastcolor' undeclared (first use in this function)
   14 |         if(S[0]=="B")lastcolor=0;
      |                      ^~~~~~~~~
main.c:14:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:21: warning: comparison between pointer and integer
   15 |         else if(S[0]=="W")lastcolor=1;
      |                     ^~
main.c:18:25: warning: comparison between pointer and integer
   18 |                 if(S[i] == "B"){
      |                         ^~
main.c:19:25: error: 'color' undeclared (first use in this function)
   19 |                         color=0;
      |                         ^~~~~
main.c:21:29: warning: comparison between pointer and integer
   21 |                 else if(S[i]=="W"){
      |                             ^~
main.c:34:16: error: expected expression before '%' token
   34 |         printf(%d,count);
      |                ^
Language: C++

int main(){
	string s;
	int ans=0;

	cin>>s;
	
	char prev= s.at(0);
	
	for(int i=1; i<s.size(); i++){
//		cout<< prev<<endl;
//		cout<< s.at(i)<<endl;

		if(prev!= s.at(i)) ans++;
		prev= s.at(i);
	}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:2:9: error: 'string' was not declared in this scope
    2 |         string s;
      |         ^~~~~~
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin>>s;
      |         ^~~
a.cc:5:14: error: 's' was not declared in this scope
    5 |         cin>>s;
      |              ^
a.cc:18:9: error: 'cout' was not declared in this scope
   18 |         cout<< ans<< endl;
      |         ^~~~
a.cc:18:22: error: 'endl' was not declared in this scope
   18 |         cout<< ans<< endl;
      |                      ^~~~
Language: C

#include <stdio.h>
int main(void){
    char S[100001];
    int i, j, n, Ans;
    scanf("%s",S);
    j = S[0];
    n = strlen(S);
    Ans = 0;
    for(i=1; i<n; i++){
        if(S[i] != j){
            ++Ans;
            j = S[i];
            }
        }
    printf(%d\n", Ans);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    7 |     n = strlen(S);
      |         ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | int main(void){
main.c:7:9: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    7 |     n = strlen(S);
      |         ^~~~~~
main.c:7:9: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:15:12: error: expected expression before '%' token
   15 |     printf(%d\n", Ans);
      |            ^
main.c:15:14: error: stray '\' in program
   15 |     printf(%d\n", Ans);
      |              ^
main.c:15:16: warning: missing terminating " character
   15 |     printf(%d\n", Ans);
      |                ^
main.c:15:16: error: missing terminating " character
   15 |     printf(%d\n", Ans);
      |                ^~~~~~~~
main.c:16:14: error: expected ';' before '}' token
   16 |     return 0;
      |              ^
      |              ;
   17 | }
      | ~
Language: C

#include <stdio.h>
int main(void){
    char S[100001];
    int i, j, n, Ans;
    scanf("%s",S);
    j = S[0];
    n = strlen(S)-1;
    Ans = 0;
    for(i=1; i<n; i++){
        if(S[i] != j){
            ++Ans;
            j = S[i];
            }
        }
    printf(%d\n", Ans);
    return0;
}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    7 |     n = strlen(S)-1;
      |         ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | int main(void){
main.c:7:9: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    7 |     n = strlen(S)-1;
      |         ^~~~~~
main.c:7:9: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:15:12: error: expected expression before '%' token
   15 |     printf(%d\n", Ans);
      |            ^
main.c:15:14: error: stray '\' in program
   15 |     printf(%d\n", Ans);
      |              ^
main.c:15:16: warning: missing terminating " character
   15 |     printf(%d\n", Ans);
      |                ^
main.c:15:16: error: missing terminating " character
   15 |     printf(%d\n", Ans);
      |                ^~~~~~~~
main.c:16:13: error: expected ';' before '}' token
   16 |     return0;
      |             ^
      |             ;
   17 | }
      | ~
Language: Java


import java.io.*;
import java.util.*;
import java.lang.*;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
		String s = r.readLine();
		System.out.println(solve(s));
	}

	public int solve(String s) {
		int result = 0;
		for (int j = 1; j < s.length(); j++)
			if (s.charAt(j) != s.charAt(j - 1))
				result++;
		return result;
	}

}



Compiler output:
Main.java:11: error: non-static method solve(String) cannot be referenced from a static context
		System.out.println(solve(s));
		                   ^
1 error
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<map>
#include<sstream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<cmath>
#include<utility>
#include<set>
#include <queue>
#define ull unsigned long long
#define ll long long
#define pii pair<int,int>
#define pb(x) push_back(x)
#define S(x) scanf("%d",&x)
#define Sl(x) scanf("%lld",&x)
#define M(x,i) memset(x,i,sizeof(x))
#define F(i,a,n) for(i=(a);i<(n);++i)
#define FD(i,a,n) for(i=(a);i>=(n);--i)
using namespace std;
int main()
{
    int i,cnt;
    cnt = 0;
    string s;
    cin>>s;
    int len = s.length();
    if(len == 1){
        cout<<0<<endl;
        return 0;
    }

    F(i,1,len){
        if(s[i] != s[i-1]){
            cnt++;
        }
    }

    cout<<

Compiler output:
a.cc: In function 'int main()':
a.cc:43:11: error: expected primary-expression at end of input
   43 |     cout<<
      |           ^
a.cc:43:11: error: expected '}' at end of input
a.cc:26:1: note: to match this '{'
   26 | {
      | ^
Language: C++

#include<cstdio>
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<queue>
#include<stack>
#include<map>
#include <iomanip>

#define rep0(i,N) for(int i=0;i<N;i++)
#define rep1(i,a,N) for(int i=0+a;i<N;i++)
#define lint long long int
#define SIZE 100005

using namespace std;

int main(){
	string str;
	cin>>str;
	lint ans=0;
	int cc;
	if(str[0]=='B')cc=0;
	else cc=1;
	rep1(i,1,str.size()){
		if(str[i]=='B'){
			if(cc==1) ans++;
			cc=0;
		}
		else{
			if(cc==0) ans++;
			cc=1;
		}
	}
	cout<<ans;

return 0;

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

import std.stdio;
import std.conv, std.array, std.algorithm, std.string;
import std.math, std.random, std.range, std.datetime;
import std.bigint;

void main(){
	string s = readln.chomp;
	
	int ans;
	char x = 'a';
	foreach(c; s){
		if(x != 'a') if(x != c) ans += 1;
		x = c;
		}
	
	ans.writeln;
	}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import std.conv, std.array, std.algorithm, std.string;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import std.math, std.random, std.range, std.datetime;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import std.bigint;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: '::main' must return 'int'
    6 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string s = readln.chomp;
      |         ^~~~~~
a.cc:11:17: error: 'c' was not declared in this scope
   11 |         foreach(c; s){
      |                 ^
a.cc:11:20: error: 's' was not declared in this scope
   11 |         foreach(c; s){
      |                    ^
a.cc:16:13: error: request for member 'writeln' in 'ans', which is of non-class type 'int'
   16 |         ans.writeln;
      |             ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namesapce std;
int main()
{
	string s;
	cin>>s;
	int num=0;
	char c=s[0];
	for(int i=1;s[i]!=0;i++){
		if(c!=s[i]){
			num++;
			c=s[i];
		}
	} 
	printf("%d\n",num);
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string s;
      |         ^~~~~~
a.cc:5:9: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin>>s;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:14: error: 's' was not declared in this scope
    6 |         cin>>s;
      |              ^
Language: C++


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;

char str[123456];

int main(void)
{
	scanf("%s", str);
	int ans = 0;
	for (int i = 1; i < strlen(str); ++i)
	{
		if (str[i - 1] != str[i])++ans;
	}
	printf("%d\n", ans);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:29: error: 'strlen' was not declared in this scope
   28 |         for (int i = 1; i < strlen(str); ++i)
      |                             ^~~~~~
a.cc:20:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   19 | #include <queue>
  +++ |+#include <cstring>
   20 | using namespace std;
Language: C++

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

const int N = 1e5 + 5;

#define int long long

int n, A[N], T;

map < int, int > Map;

main() {
	cin >> n >> T;
	for(int i = 1; i <= n; ++ i) scanf("%lld", &A[i]);
	int Mi = 1e9, ans = 0;
	for(int i = 1; i <= n; ++ i) {
		Mi = min(Mi, A[i]);
		ans = max(ans, A[i] - Mi);
	}
	
	Mi = 1e9;
	int cnt1 = 0, cnt2 = 0;
	for(int i = 1; i <= n; ++ i) {
		++ Map[A[i]];
		Mi = min(Mi, A[i]);
		if(A[i] - Mi == ans) {
			cnt1 += Map[Mi];
			++ cnt2;
			Map[Mi] = 0;
		}
	}
	cout << min(min(cnt1, cnt2), 1000000000);
}

Compiler output:
a.cc:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   12 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:32:20: error: no matching function for call to 'min(const long long int&, int)'
   32 |         cout << min(min(cnt1, cnt2), 1000000000);
      |                 ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:32:20: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   32 |         cout << min(min(cnt1, cnt2), 1000000000);
      |                 ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281: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:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:32:20: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   32 |         cout << min(min(cnt1, cnt2), 1000000000);
      |                 ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~