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

#include <cstdio>
#include <cstdlib>
#include <cmath>

#include <iostream>

#include <vector>
#include <algorithm>

using namespace std;

int main(){
  int N,A,B,C,D;
  cin >> N >> A >> B >> C >> D;
  A--;B--;C--;D--;
  char s[N+1];
  for(int i=0;i<N;i++){
    cin >> s[i];
  }
  s[A] = 'A';
  s[B] = 'B';
  s[C] = 'C';
p  s[D] = 'D';
  bool isOver = false;
  while(!isOver){
    //cout << N << ' ';
    //for(int i=0;i<N;i++) cout << s[i];
    //cout << endl;
    isOver = true;
    for(int i=1;i<=2;i++){
      if(B == D || B == N-1) continue;
      if(s[B+i] != '#' && s[B+i] != 'A' && B+i < N){
	s[B] = '.';
	s[B+i] = 'B';
	B = B+i;
	isOver = false;
      }
    }

    for(int i=1;i<=2;i++){
      if(A == C || A == N-1) continue;
      if(s[A+i] != '#' && s[A+i] != 'B' && A+i < N){
	s[A] = '.';
	s[A+i] = 'A';
	A = A+i;
	isOver = false;
      }
    }
  }

  if(A == C && B == D) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:1: error: 'p' was not declared in this scope
   23 | p  s[D] = 'D';
      | ^
Language: C++

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

S = [1] + [ 1 if x == "#" else 0 for x in input()]

S[A] = 2
S[B] = 3


if B < A:
    A, B = B, A
    C, D = D, C

enable = True

for i in range(min(A, B)+1, max(C, D)-1):
    if S[i] == S[i+1] == 1:
        enable = False
        break

if A < B < D < C:
    vcnt = 0
    for i in range(B-1, D+1+1):
        if S[i] == 0:
            vcnt += 1
            if vcnt >= 3:
                break
        else:
            vcnt = 0
    else:
        enable = False

print("Yes" if enable else "No")


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

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

bool check(int x, int y, vector<bool> lock) {
	for (int i = x;i < y ;i++) {
		if (!lock[i] && !lock[i + 1])
			return false;
	}
	return true;
}

int main() {
	int n,a, b, c, d;
	string s;
	cin >> n >> a >> b >> c >> d >> s;
	vector<bool> lock(n,true);
	for (int i = 0;i < n;i++) {
		if (s[i] == '#')
			lock[i] = false;
	}
	a--;b--;c--;d--;
	bool ans=false;
	if (check(a, c, lock) && check(b, d, lock))
		ans = true;
	else {
		ans = false;
	}
	if (ans) {
		if (d < c) {
			int gg = 0;
			bool ju = false;
			int i = b - 1;
			int co = 0;
			while (i < d + 2) {
				if (lock[i]) {
					co++;
					gg = max(gg, co);
				}
				else {
					co = 0;
				}
				i++;
			}
			if (gg < 3) {
				ans = false;
			}
		}
	}
	if (ans)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
}

Compiler output:
a.cc:1:24: warning: extra tokens at end of #include directive
    1 | #include <bits/stdc++>h>
      |                        ^
a.cc:1:10: fatal error: bits/stdc++>: No such file or directory
    1 | #include <bits/stdc++>h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <queue>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <map>
#include <stdio.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for(int i = (a); i < (int)(b); i++)
void chmin(int &a, int b) { if (a > b) a = b; }

typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vint;
typedef vector<string> vstr;
typedef pair<ll, ll> pint;
unsigned long long inf = (1LL << 62);
ll MOD = (ll)pow(10.0, 9.0) + 7;
pint dx[4] = { {0, 1}, {0, -1}, {1, 0}, {-1, 0} };
char da[4] = { 'R', 'L', 'D', 'U' };
char dax[4] = { -1, 1, -1, 1 };
char dax2[4] = { 1, -1, 1, -1 };
ll min(ll a, ll b)
{

	return (a < b) ? a : b;
}
ll max(ll a, ll b) { return (a > b) ? a : b; }



int main() {
	ll N, A, B, C, D;
	string S;


	cin >> N >> A >> B >> C >> D;
	cin >> S;
	A--, B--, C--, D--;
	bool flag = false;
	rep(i, S.size()-1) {

		if (S[i] == '#' && S[i+1] == '#' &&  ( (A < i && i < C) || (B < i && i < D))){
			cout << "No" << endl;
			return 0;
		}

		

	}

	if (C < D) {
		cout << "Yes" << endl;
		
	}

	else {

		rep(i, S.size() - 2) {
			if (S[i] == '.' && S[i + 1] == '.' && S[i+2] == '.' && (B-2 <= i && i <= D)) {
				flag = true;
			}

		}

		if (flag == true ||  < 2)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;

	}
	
	
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:72:38: error: expected primary-expression before '<' token
   72 |                 if (flag == true ||  < 2)
      |                                      ^
Language: C++

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

signed main(){
    int n,sunuke_first,hunuke_first,sunuke_last,hunuke_last;
    cin >> n >> sunuke_first >> hunuke_first >> sunuke_last >> hunuke_last;
    string s;
    cin >> s;

    if(sunuke_last<sunuke_first&&hunuke_last<hunuke_first)
    {
        cout << "No" << endl;
        return;
    }

    queue<int> que;
    rep(i,n-1)
    {
        if(s[i]=='#'&&s[i+1]=='#')que.push(i);
    }

    rep(i,s.size())
    {
        if((sunuke_first<que.front()&&que.front()<sunuke_last)||(hunuke_first<que.front()&&que.front()<hunuke_last))
        {
            cout << "No" << endl;
            return;
        }
    }
    cout << "Yes" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 |         return;
      |         ^~~~~~
a.cc:30:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
   30 |             return;
      |             ^~~~~~
Language: C++

I don't know

Compiler output:
a.cc:1:6: warning: missing terminating ' character
    1 | I don't know
      |      ^
a.cc:1:6: error: missing terminating ' character
    1 | I don't know
      |      ^~~~~~~
a.cc:1:1: error: 'I' does not name a type
    1 | I don't know
      | ^
Language: C++

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

signed main(){
    int n,sunuke_first,hunuke_first,sunuke_last,hunuke_last;
    cin >> n >> a >> b >> c >> d;
    string s;
    cin >> s;

    if(sunuke_last<sunuke_first&&hunuke_last<hunuke_first)
    {
        cout << "No" << endl;
        return;
    }

    queue<int> que;
    rep(i,n-1)
    {
        if(s[i]=='#'&&s[i+1]=='#')que.push(i);
    }

    rep(i,s.size())
    {
        if((sunuke_first<que.front()&&que.front()<sunuke_last)||(hunuke_first<que.front()&&que.front()<hunuke_last))
        {
            cout << "No" << endl;
            return;
        }
    }
    cout << "Yes" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'a' was not declared in this scope
    9 |     cin >> n >> a >> b >> c >> d;
      |                 ^
a.cc:9:22: error: 'b' was not declared in this scope
    9 |     cin >> n >> a >> b >> c >> d;
      |                      ^
a.cc:9:27: error: 'c' was not declared in this scope
    9 |     cin >> n >> a >> b >> c >> d;
      |                           ^
a.cc:9:32: error: 'd' was not declared in this scope
    9 |     cin >> n >> a >> b >> c >> d;
      |                                ^
a.cc:16:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 |         return;
      |         ^~~~~~
a.cc:30:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
   30 |             return;
      |             ^~~~~~
Language: C


#define ll				long long
#define MOD				1000000007
#define VTX_MAX			10000
#define EDGE_MAX		10000

#include <float.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>


FILE *in, *ans;
int tno;

int out(const char *s) {
#ifdef TEST
	char buf[8192];
	fgets(buf, sizeof(buf), ans);
	if (strcmp(buf, s)) {
		printf("err\n");
	}
#else
	printf(s);
#endif
	return 0;
}

int outi(int i) {
	char s[128];
	sprintf(s, "%d\n", i);
	out(s);
	return 0;
}

int outd(double d) {
	char s[128];
	sprintf(s, "%.10lf\n", d);
	out(s);
	return 0;
}

int outll(ll l) {
	char s[128];
	sprintf(s, "%lld\n", l);
	out(s);
	return 0;
}

int geti() {
	int i;
	fscanf(in, "%d", &i);
	return i;
}

ll getll() {
	ll l;
	fscanf(in, "%lld", &l);
	return l;
}

int getstr(char *s) {
	fscanf(in, "%s", s);
	return 0;
}

int n, a, b, c, d;
char s[200010];

int move(int f, int t) {
	int i;
	int ret = 0;

	if (f > 0) {
		if (s[f - 1] == '.') {
			if (s[f + 1] == '.') {
				ret = 1;
			}
		}
	}
	for (i = f; i < t; i++) {
		if (s[i + 1] == '#') {
			if (s[i + 2] == '#') {
				return -1;
			}
			i++;
		}
		else {
			if (s[i + 2] == '.') {
				ret = 1;
			}
		}
	}

	return ret;
}

int fnc2() {
	int i, j, k;

	n = geti();
	a = geti() - 1;
	b = geti() - 1;
	c = geti() - 1;
	d = geti() - 1;
	getstr(s);

	int ret = move(b, d);
	if (ret < 0) {
		return -1;
	}

	int ret2 = move(a, c);
	if (ret < 0) {
		return -1;
	}

	if (c > d) {
		if (ret != 1) {
			return -1;
		}
	}

	return 0;
}

int fnc1() {
	int ret = fnc2();
	if (ret == 0) {
		out("Yes\n");
	}
	else {
		out("No\n");
	}
	return 0;
}

int main() {

#ifdef TEST
	for (tno = TEST_SNO; tno <= TEST_ENO; tno++) {
		char str[128];
		sprintf(str, "test%d.txt", tno);
		in = fopen(str, "r");
		sprintf(str, "ans%d.txt", tno);
		ans = fopen(str, "r");
		fnc1();
		fclose(in);
		fclose(ans);
	}
	printf("end\n");
#else
	in = stdin;
	fnc();
#endif

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:157:9: error: implicit declaration of function 'fnc'; did you mean 'fnc1'? [-Wimplicit-function-declaration]
  157 |         fnc();
      |         ^~~
      |         fnc1
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <tuple>
#include <algorithm>

using namespace std;


int main() {
	int N, A, B, C, D;
	// N: string len
	// A->C
	// B->D
	string S;

	cin >> N >> A >> B >> C >> D >> S;
	// 0 start
	A -= 1;
	B -= 1;
	C -= 1;
	D -= 1;

	// if (D < C) {
	// 	cout << "No" << endl;
	// 	exit(0);
	// }

	cout << S[0] << endl;
	bool BcanMove = false;
	bool AcanMove = false;

	int Bnow = B;
	// Move B
	while (Bnow < N) {
		if (Bnow == D) {
			BcanMove = true;
			break;
		}
		if ( (S[Bnow + 2] != '#') && (Bnow + 2 <= D) ) {
			Bnow += 2;
			continue;
		} else if ((S[Bnow + 1] != '#') && (Bnow + 1 <= D) ) {
			Bnow += 1;
			continue;
		} else {
			break; // B cannot move
		}
	}

	if (!BcanMove) {
		cout << "No" << endl;
	} else { // Success B move
		S[D] = "#";

		int Anow = A;
		// Move A
		while (Anow < N) {
			if (Anow == C) {
				AcanMove = true;
				break;
			}
			if ( (S[Anow + 2] != '#') && (Anow + 2 <= D) ) {
				Anow += 2;
				continue;
			} else if ((S[Anow + 1] != '#') && (Anow + 1 <= D) ) {
				Anow += 1;
				continue;
			} else {
				break; // B cannot move
			}
		} // end whle	

		if (AcanMove && BcanMove) {
			cout << "Yes" << endl;
		}
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:24: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   54 |                 S[D] = "#";
      |                        ^~~
      |                        |
      |                        const char*
Language: C++

#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;
typedef long long ll;
typedef pair<int,int> Pint;
typedef pair<ll, ll> P;
//typedef pair<int, pair<int, int>> P;
//typedef tuple<int,int,int> T;
ll INFL = 1000000000000000010;//10^18 = 2^60
int INF = 2000000000;//10^9
ll MOD  = 1000000007;
//vector<int> dy = {0,0,1,-1};
//vector<int> dx = {1,-1,0,0};


int main(void){
	int a,b,c,d;
	string s;
	cin >> a >> b >> c >> d >> d;
	cin >> S;

  cout << "Yes" << endl;







}


Compiler output:
a.cc: In function 'int main()':
a.cc:104:16: error: 'S' was not declared in this scope
  104 |         cin >> S;
      |                ^
Language: C

include <stdio.h>
int main(void)
{
	int n, a, b, c, d, i, ans;
	char s[200000];
	ans = 0;
	scanf("%d", &n);
	scanf("%d", &a);
	scanf("%d", &b);
	scanf("%d", &c);
	scanf("%d", &d);
	scanf("%s", s);
	if (c > d) {
		for (i = 0; i < n; i++) {
			if (s[i] == '#') {
				if (s[i + 1] == '.') {
					if (s[i + 2] == '.') {
						if (s[i + 3] == '.') {
							ans = 1;
						}
					}
				}
			}
		}
	}
	else {
		ans = 1;
	}
	if (ans == 1) {
		printf("Yes");
	}
	else {
		printf("No");
	}

	return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: Java


public class Main {
    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = in.nextInt();
        final int a = in.nextInt();
        final int b = in.nextInt();
        final int c = in.nextInt();
        final int d = in.nextInt();

        final String input = in.next();
        if (input.indexOf("##", a) != -1
                || input.indexOf("##", b) != -1) {
            System.out.println("No");
            return;
        }
        final char[] line = input.toCharArray();
        if (d > c) {
            System.out.println("Yes");
            return;
        }

        if (line[d - 2] == '.') {
            if (c == d + 1) {
                System.out.println("Yes");
                return;
            }
            if (line[d] == '.') {
                System.out.println("Yes");
                return;
            }
        }


        if (line[b] == '.') {
            if (a == b - 3 || line[b - 2] == '.') {
                System.out.println("Yes");
                return;
            }
        }
        if (input.indexOf("...", b - 1) != -1) {
            System.out.println("Yes");
            return;
        }
        System.out.println("No");
    }
}


Compiler output:
Main.java:4: error: cannot find symbol
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
              ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
                               ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
                                           ^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
                                                              ^
  symbol:   class InputStreamReader
  location: class Main
4 errors
Language: C++

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

int main(){
int N; cin >> N;
int A,B,C,D; cin >> A >> B >> C >> D;
char T[200020]=0;
for(int i=1;i<=N;i++){
  cin >> T[i];
}
  bool can = true;
  for(int j=min(A,B);j<max(C,D);j++){
    if(T[j] == '#' && T[j+1] == '#'){
      can = false;
    }
  }
  if(D > C && T[C-1] == '#'){
    can = false;
  }
  if(can){cout << "Yes" << endl;}
  else{cout << "No" << endl;}
  return 0;
}
       
       
       

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: array must be initialized with a brace-enclosed initializer
    7 | char T[200020]=0;
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define next Next
#define gc getchar
/*char buf[1<<21],*p1=buf,*p2=buf;
inline int gc(){return p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++;}*/
inline int read()
{
    int ret=0,f=0;char c=gc();
    while(!isdigit(c)){if(c=='-')f=1;c=gc();}
    while(isdigit(c)){ret=ret*10+c-48;c=gc();}
    if(f)return -ret;return ret;
}
const int N=1e6+5;
char s[N];
int main()
{
	int n=read(),a=read(),b=read(),c=read(),d=read();
	cin>>s+1;
	if(a>b)
	{
		swap(a,b);
		swap(c,d);
	}
	if(s[a]=='#'||s[b]=='#'||s[c]=='#'||s[d]=='#')
	{
		puts("No");
		return;
	}
	if(c<d)
	{
		int gs=0;
		for(int i=b;i<=d;i++)
		{
			if(s[i]=='#')gs++;
			else gs=0;
			if(gs==2){puts("No");return 0;}
		}
		for(int i=a;i<=c;i++)
		{
			if(s[i]=='#')gs++;
			else gs=0;
			if(gs==2){puts("No");return 0;}
		}
		puts("Yes");
	}
	else{
		int gs=0;
		for(int i=a;i<=c;i++)
		{
			if(s[i]=='#')gs++;
			else gs=0;
			if(gs==2){puts("No");return 0;}
		}
		gs=0;
		for(int i=b-1;i>=a;i--)
			if(s[i]=='.')gs++;
			else break;
		for(int i=b;i<=d;i++)
		{
			if(s[i]=='.')gs++;
			else gs=0;
			if(gs>2){puts("Yes");return 0;}
		}
		for(int i=d+1;i<=c;i++)
			if(s[i]=='.')gs++;
			else break;
		if(gs>2)puts("Yes");
		else puts("No");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   28 |                 return;
      |                 ^~~~~~
Language: C

    #include<stdio.h>
     
    int main(){
      int N,A,B,C,D;
      char S;
      scanf("%d %d %d %d %d",&N,&A,&B,&C,&D);
      scanf("%s",&S);
      printf("%s",S);

Compiler output:
main.c: In function 'main':
main.c:8:7: error: expected declaration or statement at end of input
    8 |       printf("%s",S);
      |       ^~~~~~
Language: C

#include<stdio.h>

int main(){
  int N,A,B,C,D;
  char S;
  scanf("%d %d %d %d %d",&N,&A,&B,&C,&D);
  scanf("%s",&S);
  printf("%s",S);

Compiler output:
main.c: In function 'main':
main.c:8:3: error: expected declaration or statement at end of input
    8 |   printf("%s",S);
      |   ^~~~~~
Language: C++

#include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
    int n,a,b,c,d,i,flag,f1,f2;
    char str[200000+5];
    scanf("%d %d %d %d %d",&n,&a,&b,&c,&d);
    getchar();
    gets(str);
    if(c>d)
    {
        f1=1;
    }
    for(i=0;i<n;i++)
    {
        if(i>=2&&str[i]=='.'&&str[i-1]=='.'&&str[i-2]=='.')
            f2=1;
        if(i>=1&&str[i]=='#'&&str[i-1]=='#')
        {
            flag=0;
            break;
        }
    }
    if(flag==0)
        printf("No\n");
    else
    {
        if(f1==1)
        {
            if(f2==1)
                printf("Yes\n");
            else
                printf("No\n");
        }
        else
            printf("Yes\n");
    }
    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(str);
      |     ^~~~
      |     getw
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end())
#define VRSORT(v) sort(v.rbegin(), v.rend())//vectorの降順ソート
#define ll long long
#define pb(a) push_back(a)
#define INF 1000000000
#define MOD 1000000007
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;

typedef vector<unsigned int>vec;
typedef vector<vec> mat;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }


int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,a,b,c,d;
    string s;
    cin>>n>>a>>b>>c>>d;
    cin>>s;
    int ma_dot=0,ma_block=0;
    bool flg=true;
    bool block=false;
    int tmp1=0;
    REP(i,n){
        if(i<n-1) if(s[i]=='#' && s[i+1]=='#') block=true;
        if(s[i]=='.'){
            if(flg) tmp++;
            else{
                flg=true;
                tmp=1;
            }
        }
        else{
            if(flg){
                ma_dot=max(ma_dot,tmp);
                tmp=0;
            }
        }
    }
    if(block){
        cout<<"No"<<endl;
        return 0;
    }
    if(c<d){
        cout<<"Yes"<<endl;
        return 0;
    }
    else{
        if(ma_dot>=3){
            cout<<"Yes"<<endl;
            return 0;
        }
    }
    cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:21: error: 'tmp' was not declared in this scope; did you mean 'tmp1'?
   40 |             if(flg) tmp++;
      |                     ^~~
      |                     tmp1
a.cc:43:17: error: 'tmp' was not declared in this scope; did you mean 'tmp1'?
   43 |                 tmp=1;
      |                 ^~~
      |                 tmp1
a.cc:48:35: error: 'tmp' was not declared in this scope; did you mean 'tmp1'?
   48 |                 ma_dot=max(ma_dot,tmp);
      |                                   ^~~
      |                                   tmp1
Language: C++

#include<bits/stdc++.h>
#define mod 1000000007
#define f first
#define s second

using namespace std;

/*int gcd(int a,int b){
	if(b == 0)
		return a;
	return gcd(b,a%b);
}*/

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

int n,a,b,c,d;
string si;
bool dfs(int i,int j){
	if(i >n || j>sn)
		return false;
	if(i == j || si[i-1] == '#' || si[j-1] == '#')
		return false;
	if(i == c && j == d)
		return true;

	return dfs(i+1,j) || dfs(i+2,j) || dfs(i,j+1) || dfs(i,j+2);
}

int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    cin>>n>>a>>b>>c>>d;
    cin>>si;

    if(dfs(a,b))
    	cout<<"YES";
    else
    	cout<<"NO";
	return 0;
}

Compiler output:
a.cc: In function 'bool dfs(int, int)':
a.cc:21:22: error: 'sn' was not declared in this scope; did you mean 'yn'?
   21 |         if(i >n || j>sn)
      |                      ^~
      |                      yn
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int N,A,B,C,D;
    cin >> N >> A >> B >> C >> D;
    A--;B--;C--;D--;
    string s;
    cin >> s;
    for(int i=0;i<N;i++){
        if(s[i]=='#'&&s[i+1]=='#'){
            if((A<i&&i<C)||(B<i&&i<D)){
                cout << "No" << endl;
                return 0;
            }
        }
    }
    if(C<D){
        cout << "Yes" << endl;
        return 0;
    }else{
        if(C-D<=1&&(s[D-1]=='#'||s[D+1]=='#')){
            if(D+2<=N && s[D+2]=='.'){
                cout << "Yes" << endl;
            }else{
                cout << "No" << endl;
                return 0;
            }
        }else{
            cout << "Yes" << endl;
            return 0;
        }
    }
}
#include <bits/stdc++.h>
using namespace std;
int main(){
    int N,A,B,C,D;
    cin >> N >> A >> B >> C >> D;
    A--;B--;C--;D--;
    string s;
    cin >> s;
    for(int i=0;i<N;i++){
        if(s[i]=='#'&&s[i+1]=='#'){
            if((A<i&&i<C)||(B<i&&i<D)){
                cout << "No" << endl;
                return 0;
            }
        }
    }
    if(C<D){
        cout << "Yes" << endl;
        return 0;
    }else{
        if(C-D<=1&&(s[D-1]=='#'||s[D+1]=='#')){
            if(s[D+2]=='.'){
                cout << "Yes" << endl;
            }else{
                cout << "No" << endl;
                return 0;
            }
        }else{
            cout << "Yes" << endl;
            return 0;
        }
    }
}


Compiler output:
a.cc:36:5: error: redefinition of 'int main()'
   36 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#include <stdio.h>


using namespace std;

int main() {
   int N,a,b,c,d;
  cin >> N >> a >> b >> c >> d;
  for(i=0;i<n;i++){
    string g;
    cin >> g;
    if(g.at(c) == "#"){
      cout << "No" << endl;
    if else(g.at(d) == "#")
      cout << "No" << endl;
    else
      cout << "Yes" << endl;}
  }
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'i' was not declared in this scope
   11 |   for(i=0;i<n;i++){
      |       ^
a.cc:11:13: error: 'n' was not declared in this scope
   11 |   for(i=0;i<n;i++){
      |             ^
a.cc:14:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(g.at(c) == "#"){
      |        ~~~~~~~~^~~~~~
a.cc:16:8: error: expected '(' before 'else'
   16 |     if else(g.at(d) == "#")
      |        ^~~~
      |        (
a.cc:18:5: error: expected '}' before 'else'
   18 |     else
      |     ^~~~
a.cc:14:23: note: to match this '{'
   14 |     if(g.at(c) == "#"){
      |                       ^
a.cc: At global scope:
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#include <stdio.h>


using namespace std;

int main() {
   int N,a,b,c,d;
  cin >> N >> a >> b >> c >> d;
  for(i=0;i<n;i++){
    string g;
    cin >> g;
    if(g.at(c) == #){
      cout << "No" << endl;
    if else(g.at(d) == #)
      cout << "No" << endl;
    else
      cout << "Yes" << endl;
      
}


Compiler output:
a.cc:14:19: error: stray '#' in program
   14 |     if(g.at(c) == #){
      |                   ^
a.cc:16:24: error: stray '#' in program
   16 |     if else(g.at(d) == #)
      |                        ^
a.cc: In function 'int main()':
a.cc:11:7: error: 'i' was not declared in this scope
   11 |   for(i=0;i<n;i++){
      |       ^
a.cc:11:13: error: 'n' was not declared in this scope
   11 |   for(i=0;i<n;i++){
      |             ^
a.cc:14:20: error: expected primary-expression before ')' token
   14 |     if(g.at(c) == #){
      |                    ^
a.cc:16:8: error: expected '(' before 'else'
   16 |     if else(g.at(d) == #)
      |        ^~~~
      |        (
a.cc:18:5: error: expected '}' before 'else'
   18 |     else
      |     ^~~~
a.cc:14:21: note: to match this '{'
   14 |     if(g.at(c) == #){
      |                     ^
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:8:12: note: to match this '{'
    8 | int main() {
      |            ^
Language: C++

15 1 3 15 13
...#.#...#.#...

Compiler output:
a.cc:2:4: error: stray '#' in program
    2 | ...#.#...#.#...
      |    ^
a.cc:2:6: error: stray '#' in program
    2 | ...#.#...#.#...
      |      ^
a.cc:2:10: error: stray '#' in program
    2 | ...#.#...#.#...
      |          ^
a.cc:2:12: error: stray '#' in program
    2 | ...#.#...#.#...
      |            ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 15 1 3 15 13
      | ^~
Language: C++

#include <bits/stdc++.h>

#define fi first
#define se second

const int N = 300300;
const int MAGIC = 1000;
const long long mod = 998244353;

using namespace std;

int n;
char c[N];

bool go(int x, int y)
{
        while(x < y){
                if(c[x + 1] == '.'){
                        x += 1;
                } else if(c[x + 2] == '.'){
                        x += 2;
                } else{
                        return false;
                }
        }
        return x == y;
}

int main()
{
        //freopen("input.txt", "r", stdin);
        //freopen("output.txt", "w", stdout);
        ios_base::sync_with_stdio(0);

        int A, B, C, D;
        cin >> n >> A >> B >> C >> D;
        for(int i = 1; i <= n; i++){
                cin >> c[i];
        }
        if(!go(A, C) || !go(B, D)){
                cout << "No" << "\n";
                return 0;
        }
        bool res = 1;
        if(C > D){
                res = 0;
                while(B <= D){
                        if(c[B - 1] == '.' && c[B + 1] == '.'){
                                res = 1;
                                break;
                        }
                        if(c[B + 1] == '.'){
                                B += 1;
                        } else{
                                B += 2;
                        } else{
                                break;
                        }
                }
        }
        if(res){
                cout << "Yes" << "\n";
        } else{
                cout << "No" << "\n";
        }
}


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

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

int main() 
{
    string s; cin >> s;
    int n=s.size();
    int ans=0,cnt=0;
    for(int i=0;i<n;i++)
    {
        if(s[i]=='A')
        {
            cnt++;
        }
        else if(s[i]=='B' && s[i+1]='C')
        {
            ans=ans+cnt;
            i++;
        }
        else
        {
            cnt=0;
        }
    }
    cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:27: error: lvalue required as left operand of assignment
   15 |         else if(s[i]=='B' && s[i+1]='C')
Language: C++

def main():
  S = str(input())
  s = []
  i = 0
  while i <= len(S)-1:
    if i == len(S)-1:
      s.append(S[i])
      break
    if S[i] == "B" and S[i+1] == "C":
      s.append("D")
      i += 2
    else:
      s.append(S[i])
      i += 1
  ans = 0
  flag = True
  for i in range(len(s)-1, -1, -1):
    if flag and s[i] == "D":
      posi = i
      flag = False
    if not flag and s[i]=="A":
      ans += posi-i
      posi-= 1
    if s[i] == "B" or s[i] == "C":
      flag = True
  print(ans)
  
  
if __name__ == "__main__":
  main()

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

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

int main(){
    string s;
    cin >> s;
    int ccc = 0;
    int i = 0;
    if (s.size() > 3) {
        while(i + 2 < s.size() ) {
            if (s[i] == 'A') {
                if (s[i+1]=='B' && s[i+2] == 'C') {
                    s[i] = 'B';
                    s[i+1] = 'C';
                    s[i+2] = 'A';
                    ccc ++;
                    if (i -1 >=0 && s[i-1] == 'A'){
                        i --;
                    } else {
                        i = 0;
                    }
                }else {
                    i ++;
                }

            } else {
                i ++;
            }
       }
    }
    cout << ccc;
}






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

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

bool ABC(char X,char Y,char Z){
  if (X=='A'&&Y=='B'&&Z=='C'){
    return 1;
  }
  else {
    return 0;
  }
}/*ABC判別機*/
int k=0;
void kakikae(char &X,char &Y,char &Z){
  if(ABC(X,Y,Z)){
    X='B';
    Y='C';
    Z='A';
    k++;
  }
  return;
}/*ABC書き換え機*/

int main(){
  string str;
  cin >> str;
  bool j;
  if(str.size()>2){
    do{
      j=0;
      for (int long long i=0;i<str.size()-2;i++){
        if(ABC(str.at(i),str.at(i+1),str.at(i+2))){
          j=1;
          return;
        }
      }//まずABCという部分を検出
      for (int long long i=0;i<str.size()-2;i++){
        kakikae(str.at(i),str.at(i+1),str.at(i+2));
      }
    }while(j);
  }
  cout << k << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:11: error: return-statement with no value, in function returning 'int' [-fpermissive]
   33 |           return;
      |           ^~~~~~
Language: C++

#inlcude<bits/stdc++.h>
using namespace std;
int  t;
long long a;
char c;
int main(){
	 while(c!='\n'){
	 	cin>>c;
	 	if(c=='A') t++;
	 	if(c=='B') {
	 		cin>>c;
	 		if(c=='C'){
	 			a+=t;
	 			continue;
	 		}
	 		else{
				if(c=='A') t=1;;
				else t=0;
			}
		}
		if(c=='C') t=0;
	}
	printf("%d",a);
	return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:17: error: 'cin' was not declared in this scope
    8 |                 cin>>c;
      |                 ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inlcude<bits/stdc++.h>
a.cc:18:33: error: expected '}' before 'else'
   18 |                                 else t=0;
      |                                 ^~~~
a.cc:16:29: note: to match this '{'
   16 |                         else{
      |                             ^
a.cc:18:33: error: expected '}' before 'else'
   18 |                                 else t=0;
      |                                 ^~~~
a.cc:10:28: note: to match this '{'
   10 |                 if(c=='B') {
      |                            ^
a.cc: At global scope:
a.cc:21:17: error: expected unqualified-id before 'if'
   21 |                 if(c=='C') t=0;
      |                 ^~
a.cc:22:9: error: expected declaration before '}' token
   22 |         }
      |         ^
a.cc:23:15: error: expected constructor, destructor, or type conversion before '(' token
   23 |         printf("%d",a);
      |               ^
a.cc:24:9: error: expected unqualified-id before 'return'
   24 |         return 0;
      |         ^~~~~~
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n;
char a[200010];
int main(){
	gets(a);
	bool flag=false;
	int ans=0;
	if(strlen(a)<3) return 0;
	while(!flag){
		int f=0;
		for(int i=0;i<strlen(a)-2;i++)
			if(a[i]=='A'&&a[i+1]=='B'&&a[i+2]=='C'){
				a[i]='B';
				ans++;
				a[i+1]='C';
				a[i+2]='A';
				f=1;
				break;
			}
		if(!f) flag=true;
	}
	if(ans>0) printf("%d",ans);
 	return 0;
 }

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

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

bool ABC(char X,char Y,char Z){
  if (X=='A'&&Y=='B'&&Z=='C'){
    return 1;
  }
  else {
    return 0;
  }
}/*ABC判別機*/
int k=0;
void kakikae(char X,char Y,char Z){
  if(ABC(X,Y,Z)){
    X='B';
    Y='C';
    Z='A';
    k++;
  }
  return;
}/*ABC書き換え機*/

int main(){
  string str;
  cin >> str;
  while(str.size()>2){
    /*とりあえず無限ループさせてbreakのみでの脱出を狙う*/
    int j=1;
    for (int long long i=0;i<str.size()-3;i++){
      if(ABC(str.at(i),str.at(i+1),str.at(i+2))){
        j--;
        break;
      }//まずABCという部分を検出
    }
    if(j){
      return;
    }
    
    for (int long long i=0;i<str.size()-3;i++){
      kakikae(str.at(i),str.at(i+1),str.at(i+2));
    }
  }
  cout << k << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:36:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   36 |       return;
      |       ^~~~~~
Language: C++

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

bool ABC(char X,char Y,char Z){
  if (X=='A'&&Y=='B'&&Z=='C'){
    return 1;
  }
  else {
    return 0;
  }
}/*ABC判別機*/
int k=0;
void kakikae(char X,char Y,char Z){
  if(ABC(X,Y,Z)){
    X='B';
    Y='C';
    Z='A';
    k++;
  }
  return;
}/*ABC書き換え機*/

int main(){
  string str;
  cin >> str;
  int I=1;
  while(I){
    /*とりあえず無限ループさせてbreakのみでの脱出を狙う*/
    int j=1;
    for (int long long i=0;i<s.size()-4;i++){
      if(ABC(str.at(i),str.at(i+1),str.at(i+2))){
        j--;
        break;
      }//まずABCという部分を検出
    }
    if(j){
      break;
    }
    
    for (int long long i=0;i<s.size()-4;i++){
      kakikae(str.at(i),str.at(i+1),str.at(i+2));
    }
  }
  cout << k << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:30:30: error: 's' was not declared in this scope
   30 |     for (int long long i=0;i<s.size()-4;i++){
      |                              ^
a.cc:40:30: error: 's' was not declared in this scope
   40 |     for (int long long i=0;i<s.size()-4;i++){
      |                              ^
Language: C++

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

bool ABC(string X,string Y,string Z){
  if (X+Y+Z=="ABC"){
    return 1;
  }
  else {
    return 0;
  }
}/*ABC判別機*/
int k=0;
void kakikae(string X,string Y,string Z){
  if(ABC(X,Y,Z)){
    X='B';
    Y='C';
    Z='A';
    k++;
  }
  return;
}/*ABC書き換え機*/

int main(){
  string s;
  cin >> s;
  int I=1;
  while(I){
    /*とりあえず無限ループさせてbreakのみでの脱出を狙う*/
    int j=1;
    for (int long long i=0;i<s.size()-3;i++){
      if(ABC(s.at(i),s.at(i+1),s.at(i+2))){
        j--;
        break;
      }//まずABCという部分を検出
    }
    if(j){
      break;
    }
    
    for (int long long i=0;i<s.size()-3;i++){
      kakikae(s.at(i),s.at(i+1),s.at(i+2));
    }
  }
  cout << k << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:31:18: error: could not convert 's.std::__cxx11::basic_string<char>::at(((std::__cxx11::basic_string<char>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   31 |       if(ABC(s.at(i),s.at(i+1),s.at(i+2))){
      |              ~~~~^~~
      |                  |
      |                  __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
a.cc:41:19: error: could not convert 's.std::__cxx11::basic_string<char>::at(((std::__cxx11::basic_string<char>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   41 |       kakikae(s.at(i),s.at(i+1),s.at(i+2));
      |               ~~~~^~~
      |                   |
      |                   __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
Language: C++

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

bool ABC(string X,string Y,string Z){
  if (""+X+Y+Z=="ABC"){
    return 1;
  }
  else {
    return 0;
  }
}/*ABC判別機*/
int k=0;
void kakikae(string X,string Y,string Z){
  if(ABC){
    X='B';
    Y='C';
    Z='A';
    k++;
  }
  return;
}/*ABC書き換え機*/

int main(){
  string s;
  cin >> s;
  int I=1;
  while(I){
    /*とりあえず無限ループさせてbreakのみでの脱出を狙う*/
    int j=1;
    for (int long long i=0;i<s.size()-3;i++){
      if(ABC(s.at(i),s.at(i+1),s.at(i+2))){
        j--;
        break;
      }//まずABCという部分を検出
    }
    if(j){
      break;
    }
    
    for (int long long i=0;i<s.size()-3;i++){
      kakikae(s.at(i),s.at(i+1),s.at(i+2));
    }
  }
  cout << k << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:31:18: error: could not convert 's.std::__cxx11::basic_string<char>::at(((std::__cxx11::basic_string<char>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   31 |       if(ABC(s.at(i),s.at(i+1),s.at(i+2))){
      |              ~~~~^~~
      |                  |
      |                  __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
a.cc:41:19: error: could not convert 's.std::__cxx11::basic_string<char>::at(((std::__cxx11::basic_string<char>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   41 |       kakikae(s.at(i),s.at(i+1),s.at(i+2));
      |               ~~~~^~~
      |                   |
      |                   __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
Language: C++

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

bool ABC(char X,char Y,char Z){
  if (""+X+Y+Z=="ABC"){
    return 1;
  }
  else {
    return 0;
  }
}/*ABC判別機*/
int k=0;
void kakikae(string X,string Y,string Z){
  if(ABC){
    X='B';
    Y='C';
    Z='A';
    k++;
  }
  return;
}/*ABC書き換え機*/

int main(){
  string s;
  cin >> s;
  int I=1;
  while(I){
    /*とりあえず無限ループさせてbreakのみでの脱出を狙う*/
    int j=1;
    for (int long long i=0;i<s.size()-3;i++){
      if(ABC(s.at(i),s.at(i+1),s.at(i+2))){
        j--;
        break;
      }//まずABCという部分を検出
    }
    if(j){
      break;
    }
    
    for (int long long i=0;i<s.size()-3;i++){
      kakikae(s.at(i),s.at(i+1),s.at(i+2));
    }
  }
  cout << k << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:41:19: error: could not convert 's.std::__cxx11::basic_string<char>::at(((std::__cxx11::basic_string<char>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   41 |       kakikae(s.at(i),s.at(i+1),s.at(i+2));
      |               ~~~~^~~
      |                   |
      |                   __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
Language: C++

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

bool ABC(char X,char Y,char Z){
  if (X+Y+Z=="ABC"){
    return 1;
  }
  else {
    return 0;
  }
}/*ABC判別機*/
int k=0;
void kakikae(char X,char Y,char Z){
  if(ABC){
    X='B';
    Y='C';
    Z='A';
    k++;
  }
  return;
}/*ABC書き換え機*/

int main(){
  string s;
  cin >> s;
  int I=1;
  while(I){
    /*とりあえず無限ループさせてbreakのみでの脱出を狙う*/
    int j=1;
    for (int long long i=0;i<s.size()-3;i++){
      if(ABC(s.at(i),s.at(i+1),s.at(i+2))){
        j--;
        break;
      }//まずABCという部分を検出
    }
    if(j){
      break;
    }
    
    for (int long long i=0;i<s.size()-3;i++){
      kakikae(s.at(i),s.at(i+1),s.at(i+2));
    }
  }
  cout << k << endl;
}
    


Compiler output:
a.cc: In function 'bool ABC(char, char, char)':
a.cc:5:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if (X+Y+Z=="ABC"){
      |       ~~~~~^~~~~~~
Language: C++

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

bool ABC(char X,char Y,char Z){
  if (X+Y+Z=="ABC"){
    return 1;
  }
  else {
    return 0;
  }
}/*ABC判別機*/
int k=0;
void kakikae(char X,char Y,char Z){
  if(ABC){
    X='B';
    Y='C';
    Z='A';
    k++;
  }
  return;
}/*ABC書き換え機*/

int main(){
  string s;
  cin >> s;
  int I=1;
  while(I){
    /*とりあえず無限ループさせてbreakのみでの脱出を狙う*/
    int j=1;
    for (int long long i=0;i<s.size()-3;i++){
      if(ABC?(s.at(i),s.at(i+1),s.at(i+2))){
        j--;
        break;
      }//まずABCという部分を検出
    }
    if(j){
      break;
    }
    
    for (int long long i=0;i<s.size()-3;i++){
      kakikae(s.at(i),s.at(i+1),s.at(i+2));
    }
  }
  cout << k << endl;
}
    


Compiler output:
a.cc: In function 'bool ABC(char, char, char)':
a.cc:5:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if (X+Y+Z=="ABC"){
      |       ~~~~~^~~~~~~
a.cc: In function 'int main()':
a.cc:31:19: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   31 |       if(ABC?(s.at(i),s.at(i+1),s.at(i+2))){
      |               ~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 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/basic_string.h:1309:7: note: declared here
 1309 |       at(size_type __n)
      |       ^~
a.cc:31:27: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   31 |       if(ABC?(s.at(i),s.at(i+1),s.at(i+2))){
      |                       ~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:1309:7: note: declared here
 1309 |       at(size_type __n)
      |       ^~
a.cc:31:43: error: expected ':' before ')' token
   31 |       if(ABC?(s.at(i),s.at(i+1),s.at(i+2))){
      |                                           ^
      |                                           :
a.cc:31:43: error: expected primary-expression before ')' token
Language: C++

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

bool ABC(char X,char Y,char Z){
  if (X+Y+Z=="ABC"){
    return 1;
  }
  else {
    return 0;
  }
}/*ABC判別機*/
int k=0;
void kakikae(char X,char Y,char Z){
  if(ABC){
    X='B';
    Y='C';
    Z='A';
    k++;
  }
  return;
}/*ABC書き換え機*/

int main(){
  string s;
  cin >> s;
  int I=1;
  while(I){
    /*とりあえず無限ループさせてbreakのみでの脱出を狙う*/
    int j=1;
    for (int i=0;i<s.size()-3;i++){
      if(ABC?(s.at(i),s.at(i+1),s.at(i+2))){
        j--;
        break;
      }//まずABCという部分を検出
    }
    if(j){
      break;
    }
    
    for (int i=0;i<s.size()-3;i++){
      kakikae(s.at(i),s.at(i+1),s.at(i+2));
    }
  }
  cout << k << endl;
}
    


Compiler output:
a.cc: In function 'bool ABC(char, char, char)':
a.cc:5:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if (X+Y+Z=="ABC"){
      |       ~~~~~^~~~~~~
a.cc: In function 'int main()':
a.cc:31:19: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   31 |       if(ABC?(s.at(i),s.at(i+1),s.at(i+2))){
      |               ~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 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/basic_string.h:1309:7: note: declared here
 1309 |       at(size_type __n)
      |       ^~
a.cc:31:27: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   31 |       if(ABC?(s.at(i),s.at(i+1),s.at(i+2))){
      |                       ~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:1309:7: note: declared here
 1309 |       at(size_type __n)
      |       ^~
a.cc:31:43: error: expected ':' before ')' token
   31 |       if(ABC?(s.at(i),s.at(i+1),s.at(i+2))){
      |                                           ^
      |                                           :
a.cc:31:43: error: expected primary-expression before ')' token