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


            auto can = [&]( int start, int end) 
            {
                for( int i = start; i < end; i++ )
                {
                    if( s[i] == '#' && s[i+1] == '#' ) return 0;
                }
                return 1;
            };
            if( !can( a, c ) || !can( b, d ) )
            {
                puts("No");
                return 0;

Compiler output:
a.cc:2:25: error: non-local lambda expression cannot have a capture-default
    2 |             auto can = [&]( int start, int end)
      |                         ^
a.cc: In lambda function:
a.cc:6:25: error: 's' was not declared in this scope
    6 |                     if( s[i] == '#' && s[i+1] == '#' ) return 0;
      |                         ^
a.cc: At global scope:
a.cc:10:13: error: expected unqualified-id before 'if'
   10 |             if( !can( a, c ) || !can( b, d ) )
      |             ^~
Language: C++

#include<iostream>
#include<string>
typedef long long int ll;
using namespace std;
int main(){
	int n,a,b,c,d; cin >>n>>a>>b>>c>>d;
	string s; cin >>s;
	s= "#"+s+"#";
	auto can_reach=[&](int start,int end){
		for(i =start;i+1<=end;i++){
			if(s[i]=='#'&&s[i+1]=='#') return false;
		}
		return true;
	};

	if(!can_reach(a,c)|| !can_reach(b,d)){
		cout << "No" << endl;
		return 0;
	}
	if(c>d){
		bool snuke_can_over =false;
		for(int i=b;i<=d;i++){
			if(s[i-1]=='.'&&s[i]=='.'&&s[i+1]=='.'){
				snuke_can_over=true;
			}
		}
		if(!snuke_can_over){
			cout << "No" << endl;
			return 0;
		}
	}

	cout << "Yes" << endl;
	return 0;
}


Compiler output:
a.cc: In lambda function:
a.cc:10:21: error: 'i' was not declared in this scope
   10 |                 for(i =start;i+1<=end;i++){
      |                     ^
Language: C++

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

bool solve() {
  int N, A, B, C, D;
  cin >> N >> A >> B >> C >> D;
  string S; cin >> S;
  rep(i, B, D) if(S[i-1] == '#' && S[i] == '#') return false;
  rep(i, A, C) if(S[i-1] == '#' && S[i] == '#') return false;
  if(C < D) return true;
  int cnt = 0;
  rep(i, B-2, D+1) {
    if(S[i] != '#') cnt++;
    else cnt = 0;
    if(cnt >= 3) return true;
  }
  else return false;
}

int main() {
  cout << (solve() ? "Yes" : "No") << endl;
  return 0;
}


Compiler output:
a.cc: In function 'bool solve()':
a.cc:18:3: error: 'else' without a previous 'if'
   18 |   else return false;
      |   ^~~~
Language: C++

#include <iostream>
#include <string>

int n,a,b,c,d;
std::string s;

bool will_switch(){
    if(a<b){
        if(c<d) return false;
        else return true;
    }
    else{
        if(c<d) return true;
        else return false;
    }
}
bool find_triple(){
    return s.find("...") != std::string::npos);
}

bool find_double_block(int x, int y){
    std::string str = s.substr(x-1,y-x);
    return str.find("##") != std::string::npos;
}

int main() {
    std::cin >> n >> a >> b >> c >> d;
    std::cin >> s;
    if(will_switch()) {
        if(find_triple()) {std::cout << "No" << std::endl;return 0;}
    }
    if(find_double_block(a,c)){
        std::cout << "No" << std::endl;
        return 0;
    }
    if(find_double_block(b,d)){
        std::cout << "No" << std::endl;
        return 0;
    }

    return 0;
}

Compiler output:
a.cc: In function 'bool find_triple()':
a.cc:18:46: error: expected ';' before ')' token
   18 |     return s.find("...") != std::string::npos);
      |                                              ^
      |                                              ;
a.cc:18:46: error: expected primary-expression before ')' token
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: break statement not within loop or switch
   25 |     break;
      |     ^~~~~
a.cc:34:5: error: break statement not within loop or switch
   34 |     break ;
      |     ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
char a[200005];
int main(){
    int n,bx,by,fx,fy;
    cin>>n>>bx>>by>>fx>>fy;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        /*if(a[i]=='#' && a[i-1]=='#')
            check1=1;*/
    }
    for(int i=bx+1;i<=fx;i++){
        if(a[i]=='#' && a[i-1]=='#'){
            cout<<"No";
            return 0;
        }

    }
    for(int i=by+1;i<=fy;i++){
        if(a[i]=='#' && a[i-1]=='#'){
            cout<<"No";
            return 0;
        }

    }
    if(fx<fy)
        cout<<"Yes";
    else{
        for(int i=ax-2;i<=fy;i++){
            if(a[i]=='.' && a[i-1]=='.' && a[i-2]=='.'){
                cout<<"Yes";
                return 0;
            }
        }
        cout<<"No";
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:19: error: 'ax' was not declared in this scope; did you mean 'fx'?
   29 |         for(int i=ax-2;i<=fy;i++){
      |                   ^~
      |                   fx
Language: Java

import java.util.*;

public class Main {
    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int D = sc.nextInt();
        String S = sc.next();

        if(S.contains("##")){
            System.out.print("No");
            return;
        }else{
            if(C < D){
                System.out.print("Yes");
                return;
            }else{
                if(S.contains("...")){
                    System.out.print("Yes");
                }else{
                    System.out.print("No");
                }
            }
        }


Compiler output:
Main.java:28: error: reached end of file while parsing
        }
         ^
1 error
Language: C++

N,A,B,C,D = map(int,input().split())
s = list(input())
s_a =s[A-1:C]
s_b = s[B-1:D]
 
count = 0
if C < D :
 
    for i in range(C-A):
        if s_a[i] == "#" and s_a[i+1] == "#" :
            count += 1
    for i in range(D-B) :
        if s_b[i] == "#" and s_b[i+1] == "#" : 
            count += 1
 
    if count == 0 : print("Yes")
    else: print("No")
 
 
else :
    p = 0
    for i in range(C-A):
        if s_a[i] == "#" and s_a[i+1] == "#" :
            count += 1
    for i in range(D-B) :
        if s_b[i] == "#" and s_b[i+1] == "#" : 
            count += 1
    
    for i in range(D-B):
        if s_b[i] == "." :
            if  s_b[i+1] == "." and s_b[i+2]=="." :
                p += 1
    
    if p >= 1 and count == 0:
        print("Yes")
    else: print("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>
#include <assert.h>
using namespace std;
using i64 = long long;

int main()
{
  i64 n, a, b, c, d;
  string s;
  cin >> n >> a >> b >> c >> d >> s;
  bool ok = true, ok = true, pass = false;
  for (i64 i = a; i < c - 1; i++)
    if (s.substr(i, 2) == "##")
      ok = false;
  for (i64 i = b; i < d - 1; i++)
    if (s.substr(i, 2) == "##")
      ok = false;
  for (i64 i = b; i < d - 2; i++)
    if (s.substr(i, 3) == "...")
      ok = false;
  if (ok && (d < c ? pass : true))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: redeclaration of 'bool ok'
   11 |   bool ok = true, ok = true, pass = false;
      |                   ^~
a.cc:11:8: note: 'bool ok' previously declared here
   11 |   bool ok = true, ok = true, pass = false;
      |        ^~
Language: C++

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

int main(){
    ll n,a,b,c,d;
    cin>>n>>a>>b>>c>>d;
    string s;
    a--;b--;c--;d--;
    cin>>s;
    bool flag=true;

    if(d>c){
        for(int i=a;i < d;i++) {
            if(i+1<N&&s.at(i)=='#' && s.at(i+1)=='#'){
                flag=false;
            }
        }
    }else{
        flag=false;
        for(int i=b-1;i<d;i++)
        {  
            if(i+2<n &&s.at(i)=='.'&&s.at(i+1)=='.' && s.at(i+2)=='.'){
                flag=true;
            }
        }
    }

    if(flag==true){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;   
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: 'N' was not declared in this scope
   15 |             if(i+1<N&&s.at(i)=='#' && s.at(i+1)=='#'){
      |                    ^
Language: C

#include<stdio.h>

int main(){
	int n, m, a, b, c, d, i, flag=0;
	scanf("%d %d %d %d %d", &n, &a, &b, &c, &d);
	char s[n+3];
	scanf("%s", s);
	if(c>d){
		m=c;
		flag=1;
		for(i=b-1;i<d-1;i++){
			if(s[i-1]=='.'&&s[i]=='.'&&s[i+1]=='.'){
				flag=0;
				i=d;
			}
		}
	}else m=d
	for(i=0;i<m;i++){
		if(s[i]=='#'&&s[i+1]=='#'){ 
			flag=1;
			i=n;
		}
	}
	if(flag) printf("No");
	else printf("Yes");
}

Compiler output:
main.c: In function 'main':
main.c:17:18: error: expected ';' before 'for'
   17 |         }else m=d
      |                  ^
      |                  ;
   18 |         for(i=0;i<m;i++){
      |         ~~~       
main.c:25:9: error: 'else' without a previous 'if'
   25 |         else printf("Yes");
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N,A,B,C,D,p=0;
  cin>>N>>A>>B>>C>>D   ;
  string s;
  cin>>s;

  if(C>D){
    p++;
     for(int i=B-1;i<D;i++){
  if(s.at(i-1)=='.'&&s.at(i)=='.'&&s.at(i+1)=='.')
    p=0;
  }
  }
     for(int i=A;i<C-2;i++){
  if(s.at(i)=='#'&&s.at(i+1)=='#')
    p++;
  }
    
  }
  
  else if(C<D){
  for(int i=A;i<D-2;i++){
  if(s.at(i)=='#'&&s.at(i+1)=='#')
    p++;
  }
  }
  
  if(p>0)
  cout<<  "No" <<endl;
  else if(p==0)
    cout<<  "Yes" <<endl;
}

Compiler output:
a.cc:24:3: error: expected unqualified-id before 'else'
   24 |   else if(C<D){
      |   ^~~~
a.cc:31:3: error: expected unqualified-id before 'if'
   31 |   if(p>0)
      |   ^~
a.cc:33:3: error: expected unqualified-id before 'else'
   33 |   else if(p==0)
      |   ^~~~
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,sse3,sse4,popcnt,abm,mmx")

#include <bits/stdc++.h>   
#include <stdio.h>    
 
using namespace std;
     
#define F first
#define S second
#define lb lower_bound               
#define ub upper_bound
#define pb push_back
#define pf push_front    
#define ppb pop_back
#define mp make_pair
#define bpp __builtin_popcountll                                                                                        
#define sqr(x) ((x) * (x)) 
#define al 0x3F3F3F3F
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define in insert
#define ppf pop_front
#define endl '\n'
//#define int long long
 
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;
 
const int mod = (int)1e9 + 7;
const int N = (int)5e5 + 123;
const ll inf = (ll)3e18 + 1;

const double pi = acos (-1.0);
const double eps = 1e-7;
const int dx[] = {0, 0, 1, 0, -1};
const int dy[] = {0, 1, 0, -1, 0};

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

inline void boost () {                    
   ios_base :: sync_with_stdio (NULL);
   cin.tie (NULL), cout.tie (NULL);          
}                                                     

inline void Solve () {
   cin >> n >> a >> b >> c >> d;
   cin >> s + 1;
   for (int i = a; i < c; i ++) {
      if (s.substr (i, 2) == "##") cout << "No", exit (0);
   }   
   for (int i = b; i < d; i ++) {
      if (s.substr (i, 2) == "##") cout << "No", exit (0);
   }
   if (c < d) cout << "Yes";
   else {
      bool ok = 0;
      for (int i = b; i <= d; i ++) {
         if (s.substr (i - 1, 3) == "...") ok = 1;
      }   
      if (ok) cout << "Yes";
      else cout << "No";
   }
}                                     

main () {                                       
// freopen (".in", "r", stdin);    
// freopen (".out", "w", stdout);              
   boost ();
   int tt = 1;
   //cin >> tt;   
   while (tt --) { 
      Solve ();
   }                                               
   return 0;      
}


Compiler output:
a.cc: In function 'void Solve()':
a.cc:53:13: error: request for member 'substr' in 's', which is of non-class type 'char [500123]'
   53 |       if (s.substr (i, 2) == "##") cout << "No", exit (0);
      |             ^~~~~~
a.cc:56:13: error: request for member 'substr' in 's', which is of non-class type 'char [500123]'
   56 |       if (s.substr (i, 2) == "##") cout << "No", exit (0);
      |             ^~~~~~
a.cc:62:16: error: request for member 'substr' in 's', which is of non-class type 'char [500123]'
   62 |          if (s.substr (i - 1, 3) == "...") ok = 1;
      |                ^~~~~~
a.cc: At global scope:
a.cc:69:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   69 | main () {
      | ^~~~
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int startA = sc.nextInt() - 1;
        int startB = sc.nextInt() - 1;
        int goalA = sc.nextInt() - 1;
        int goalB = sc.nextInt() - 1;
        String str = sc.next();
        str = str.substring(startA, goalB);
        String str2 = str.substring(Math.max(0, startA - 1), Math.min(n - 1, goalB + 1);
        
        if (str.contains("##")) {
            System.out.println("No");
            return;
        }
        
        if (goalA < goalB) {
            System.out.println("Yes");
        } else {
            if (str2.contains("...")) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }
}


Compiler output:
Main.java:14: error: ')' or ',' expected
        String str2 = str.substring(Math.max(0, startA - 1), Math.min(n - 1, goalB + 1);
                                                                                       ^
1 error
Language: C++

#include<iostream>
#include<string>
#include<sstream>

using namespace std;

int main(){
  int n, a ,b, c,d ,x;
  string line;
  cin >> n >> a >> b >> c >> d >> line;
  //cout <<"n=" << n<< " ,a=" << a<<" ,b=" << b  <<" ,c=" << c  <<" ,d=" << d  <<  " ,line=" << line <<endl;
  //cout << line[0] << endl;
  if(c<d){
    for(int i=0; i<=n;i++){
      if(line[i]=='#' && line[i+1]=='#'){
              x=0;
              break;
         }
      else{
              x=1;
      }
    }
  }
  else{
    for(int k=b; k<=d; k++){
            if(line[k-1]=='.' && line[k+1]=='.'){
              x=1;
              break;
            }
            else{
                    x=0;
            }
    }

  }

 if(x=0){
   cout << "No" << endl;
 }
 else{
      cout << "Yes" << endl;
 }

  return 0;


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

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

int a,b,c,d,n;
string course;

int main(){

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

    a--;
    b--;
    c--;
    d--;

    bool prev_x = false;
    bool end = false;
    for(int i=a;i<c;i++){
        if(course[i] == '#'){
            if(prev_x){
                cout << "No" << endl;
                return;
            }
            prev_x = true;
        } else {
            prev_x = false;
        }   
    }

    if(!end){
        for(int i=b;i<d;i++){
            if(course[i] == '#'){
                if(prev_x){
                    cout << "No" << endl;
                    return;
                }
                prev_x = true;
            } else {
                prev_x = false;
            }        
        }
    }

    if(c<d && !end){
        cout << "Yes" << endl;
    } else if (!end) {
        int o_count = 0;
        int o_max = 0;
        for(int i=b-1;i<d+2;i++){
            if(course[i]=='.'){
                o_count++;
                o_max = max(o_count, o_max);
            } else {
                o_count = 0;
            }
        }

        if(o_max<3){
            cout << "No" << endl;
        } else {
            cout << "Yes" << endl;
        }
    }
}
.0

Compiler output:
a.cc: In function 'int main()':
a.cc:26:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   26 |                 return;
      |                 ^~~~~~
a.cc:39:21: error: return-statement with no value, in function returning 'int' [-fpermissive]
   39 |                     return;
      |                     ^~~~~~
a.cc: At global scope:
a.cc:69:1: error: expected unqualified-id before numeric constant
   69 | .0
      | ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n, a, b, c, d; cin >> n >> a >> b >> c >> d; 
  string s; cin >> s;
  int sup s.length()-1, inf = 0;
  //0 ~ #   # inf ~ A ~~ C,D        ~ sup # #   ~ .
  //0 ~ i-1 i i+1 ~ a ~~ max(c,d)-1 ~ i-1 i i+1 ~ length-1
  for(int i=0; i<a; i++){
    if(s[i-1]=='#' && s[i]=='#'){
      inf=max(inf,i+1);
    }
  }
  for(int i=s.length()-1; i>max(c,d)-1; i--){
    if(s[i]=='#' && s[i+1]=='#'){
      sup=min(sup,i-1);
    }
  }

  //連続した##のとき除外
  for(int i=inf; i<=sup; i++){
    if(s[i]=='#' && s[i+1]=='#'){
      cout << "No" << endl;
      return 0;
    }
  }
  
  if(c<d){
    cout << "Yes" << endl;
    return 0;
  }else{//(c>d)
    //連続した...ならok
    for(int i=inf; i<=sup; i++){
      if(s[i]=='.' && s[i+1]=='.' && s[i+2]=='.'){
        cout << "Yes" << endl;
        return 0;
      }
    }
    cout << "No" << endl;
    return 0;
  }  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected initializer before 's'
    6 |   int sup s.length()-1, inf = 0;
      |           ^
a.cc:11:7: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   11 |       inf=max(inf,i+1);
      |       ^~~
      |       ynf
a.cc:16:7: error: 'sup' was not declared in this scope; did you mean 'dup'?
   16 |       sup=min(sup,i-1);
      |       ^~~
      |       dup
a.cc:21:13: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   21 |   for(int i=inf; i<=sup; i++){
      |             ^~~
      |             ynf
a.cc:21:21: error: 'sup' was not declared in this scope; did you mean 'dup'?
   21 |   for(int i=inf; i<=sup; i++){
      |                     ^~~
      |                     dup
a.cc:33:15: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   33 |     for(int i=inf; i<=sup; i++){
      |               ^~~
      |               ynf
a.cc:33:23: error: 'sup' was not declared in this scope; did you mean 'dup'?
   33 |     for(int i=inf; i<=sup; i++){
      |                       ^~~
      |                       dup
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main() {
  int n, a, b, c, d, e = 0;
  string s;
  cin >> n >> a >> b >> c >> d >> s;
  if (c < d) {
  for (int i = 0; i + 1 < d - 1; i++) {
    if (s[i] == '#' && s[i + 1] == '#') {
      cout << "No" << endl;
      return 0;
    }
  }
}
for (int i + 1 = b; i + 1 <= d; i++) {
   if (s[i] == '.' && s[i + 1] == '.' && s[i + 2] == '.') {
     e += 1;
   }
 }
  if (c > d) {
    for (int i = 0; i + 1 < c - 1; i++) {
      if (s[i] == '#' && s[i + 1] == '#') {
        cout << "No" << endl;
        return 0;
      }
    if (e > 0) {
        cout << "Yes" << endl;
        return 0;
      } else {
        cout << "No" << endl;
      }
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: expected ';' before '+' token
   18 | for (int i + 1 = b; i + 1 <= d; i++) {
      |           ^~
      |           ;
a.cc:18:12: error: lvalue required as left operand of assignment
   18 | for (int i + 1 = b; i + 1 <= d; i++) {
      |            ^~~
a.cc:18:31: error: expected ')' before ';' token
   18 | for (int i + 1 = b; i + 1 <= d; i++) {
      |     ~                         ^
      |                               )
a.cc:18:33: error: 'i' was not declared in this scope
   18 | for (int i + 1 = b; i + 1 <= d; i++) {
      |                                 ^
Language: C++

#include <stdio.h>
#include <iostream>

using namespace std;

int main() {
  int n;
  int a;
  int b;
  int c;
  int d;
  bool na = false;
  bool tna = false;
  cin >> n >> a >> b >> c >> d;

  int tcnt = 0;
  int cnt = 0;
  for(int i = 0; i < n; i++) {
    char cc;
    cin >> cc;
    if (cc == '.') {
      cnt = 0;
      tcnt++;
      s[i] = 0;
    } else {
      tcnt = 0;
      if (a < i + 1 || b < i + 1) cnt++;
      s[i] = 1;
    }
    if (cnt == 2) {
      na = true;
    }
    if (tcnt == 3 && d < c) {
      tna = true;
    }
  }

  if (!na && tna) {
    cout << "Yes" << "\n";
  } else {
    cout << "No" << "\n";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:7: error: 's' was not declared in this scope
   24 |       s[i] = 0;
      |       ^
a.cc:28:7: error: 's' was not declared in this scope
   28 |       s[i] = 1;
      |       ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define REV(i,n) for(ll (i) = (n) - 1;(i) >= 0;--i)
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {REP(WW,n)cerr << v[WW] << ' ';cerr << endl << endl;}
#define SHOW2d(v,WW,HH) {REP(W_,WW){REP(H_,HH)cerr << v[W_][H_] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL
#define MOD 998244353

typedef long long ll;
typedef pair<ll,ll> P;

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

	ll n, a, b, c, d;cin >> n >> a >> b >> c >> d;
	a--;b--;c--;d--;
	string str;cin >> str;

	bool ac = true;
	bool bd = true;
	bool bc3 = false;
	for(int i = min(a, c);i < max(a, c);i++){
		if(str[i] == '#' && str[i+1] == '#')ac = false;
	}
	for(int i = min(b, d);i <= max(b, d);i++){
		if(i < d && str[i] == '#' && str[i+1] == '#')bd = false;
		if(i < n - 1 && str[i-1] == '.' && str[i] == '.' && str[i+1] == '.')bd3 = true;
	}

	if(d < c){
		if(!bd3)ac = false;
	}

	if(ac && bd){
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:85: error: 'bd3' was not declared in this scope; did you mean 'bc3'?
   38 |                 if(i < n - 1 && str[i-1] == '.' && str[i] == '.' && str[i+1] == '.')bd3 = true;
      |                                                                                     ^~~
      |                                                                                     bc3
a.cc:42:21: error: 'bd3' was not declared in this scope; did you mean 'bc3'?
   42 |                 if(!bd3)ac = false;
      |                     ^~~
      |                     bc3
Language: C

#include <stdio.h>

int main(void) {
	int N, A, B, C, D;
	int i;
	int count1 = 0;
	int count2 = 0;

	scanf("%d%d%d%d%d", &N, &A, &B, &C, &D);

	char masu[200001];

	
	scanf("%s", masu);
	

	if (C < D) {
		for (i = A;i <= C-3;i++) {
			if (masu[i] == '#'&& masu[i+1]=='#'){
				count1++;
			}
		}

		for (i = B;i <= D - 3;i++) {
			if (masu[i] == '#' && masu[i + 1] == '#') {
				count1++;
			}
		}

		if (count1 == 0) {
			printf("Yes\n");
		}
		else {
			printf("No\n");
		}
	}
	else {
		for (i = A+;i <= C - 3;i++) {
			if (masu[i] == '#' && masu[i + 1] == '#') {
				count1++;
			}
		}
		for (i = B - 2;i <= D - 2;i++) {
			if (masu[i] == '.' && masu[i + 1] == '.' && masu[i + 2] == '.') {
				count2++;
			}
		}
		if (count1==0 && count2 > 0) {
			printf("Yes\n");
		}
		else {
			printf("No\n");
		}
	}

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:38:28: error: expected expression before ';' token
   38 |                 for (i = A+;i <= C - 3;i++) {
      |                            ^
Language: C++

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

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int MAXN = 1e5;

ll n, x, s, ans;
struct Data
{
    ll b, l, r;
    bool operator < (const Data& p) const { return b*l+(x-b)*r > p.b*p.l+(x-p.b)*p.r; }
};
Data arr[MAXN+10];

int main()
{
    int i, j;

    scanf("%lld%lld", &n, &x);
    for(i=1; i<=n; i++) scanf("%lld%lld%lld", &arr[i].b, &arr[i].l, &arr[i].r), s+=arr[i].b*arr[i].l;
    sort(arr+1, arr+n+1);

    for(i=1; i<=n; i++)
    {
        ll t=s-arr[i].b*arr[i].l-(x-arr[i].b)*arr[i].r;
        if(t<0)
        {
            ll temp=0;
            for(; i<=n; i++)
            {
                if(arr[i].b*arr[i].l>=s)
                {
                    val+=(s-1)/arr[i].l+1;
                }
                else
                {
                    val+=arr[i].b;
                    s-=arr[i].b*arr[i].l;
                    val+=(s-1)/arr[i].r+1;
                }
                temp=max(temp, val);
            }
            ans+=temp;
            break;
        }
        else
        {
            ans+=x;
            s=t;
        }
    }
    printf("%lld", ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:21: error: 'val' was not declared in this scope
   36 |                     val+=(s-1)/arr[i].l+1;
      |                     ^~~
a.cc:40:21: error: 'val' was not declared in this scope
   40 |                     val+=arr[i].b;
      |                     ^~~
a.cc:44:32: error: 'val' was not declared in this scope
   44 |                 temp=max(temp, val);
      |                                ^~~
Language: C++

//A
#include <iostream>
#include <string>
using namespace std;
int Maper(int x);
int maxn = 0;
int can[3];
string S;

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

  can[0] = Maper(1);
    can[1] = Maper(2);
    can[2] = Maper(3);
  cout << can[0] << can[1] << ;
  	if(can[1] == 0 &&( can[0] * can[2] == 0)){ //絶対渡れない
    	ans = 0;
    } else if (D<C && can[0] * can[1] * can[2] == 0){ //3つとも1なら渡れる
	   	for (int i = 3 + 1;i<=N;i++){
        	
			can[0] = can[1];
            can[1] = can[2];
            can[2] = Maper(i);
            if(can[0] * can[1] * can[2] == 1){ //3つとも1なら渡れる
            	ans = 1;
                break;
            }
          	else if(can[1] == 0 &&( can[0] * can[2] == 0)){ //絶対渡れない
            	ans = 0;
              	break;
            }
        }
    }
    else{//絶対渡れる
    	ans = 1;
    }
    
    if(ans == 1){
    	cout << "Yes";
    }
    else{
    	cout << "No";
    }
  return 0;*/
  
  
}
int Maper(int x){ //上乗れる？
	if(S.find("#",x-1)+1 == x){
      //cout << "!";
      return 0;
    }
    else{
    	return 1;
    }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:20:31: error: expected primary-expression before ';' token
   20 |   cout << can[0] << can[1] << ;
      |                               ^
a.cc:49:13: error: expected primary-expression before '/' token
   49 |   return 0;*/
      |             ^
a.cc:52:1: error: expected primary-expression before '}' token
   52 | }
      | ^
Language: C++

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

#define ll long long
#define INF 99999999
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()

int N,A,B,C,D;
string s;

bool dfs(int A_current, int B_current)
{
    int ans = 1;
    if(A_current == C) return true;

    if(s[A_current] == '#')
    {
        //cout << "A_current is " << A_current << " and here #" << endl;
        return false;
    }
    if(A_current == B_current)
    {
        //cout << "A_current is " << A_current << " and here another" << endl;
        return false;
    }
    else
    {
        if(A_current + 2 <= C)
        {
            if(max(dfs(A_current + 2, B_current), dfs(A_current + 1, B_current)) == 0)
            {
                //cout << "A_current is " << A_current << " and B_current is " << B_current << " and A + 2 false" << endl;
                return false;
            }
        }
        else if(A_current + 1 <= C)
        {
            if(!dfs(A_current + 1, B_current))
            {
                //cout << "A_current is " << A_current << " and B_current is " << B_current << " and A + 1 false" << endl;
                return false;
            }
        }
        return true;
    }
}

int main()
{
    cin >> N >> A >> B >> C >> D >> s;
    A--;B--;C--;D--; 
    bool flag = false;
    if(D < C)
    {
        int cnt - 0;
        rep(i,s.size())
        {
            cnt++;
            if(s[i] == '#') cnt = 0;
            if(cnt > 3) flag = true; 
        }
        if(!flag)
        {
            cout << "No" << endl;
            return 0;
        }
    }

    for(int i = B; i < D+1; i++)
    {
        //cout << "test" << endl;
        if(s[i] != '#')
        {
            if(s[i-1] == '#') continue;
            else if(i != D && s[i+1] == '#') continue;
            //cout << i << " is clead" << endl;
            if(dfs(A,i))
            {
                cout << "Yes" << endl;
                return 0;
            }
        }
    }
    cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:56:17: error: expected initializer before '-' token
   56 |         int cnt - 0;
      |                 ^
a.cc:59:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   59 |             cnt++;
      |             ^~~
      |             int
Language: C++

#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
#define X first
#define Y second
#define INF 1000 * 1000 * 1000
#define LL long long
#define LINF INF * (LL)INF
#define PB push_back
#define SZ(a) ((LL)a.size())
#define INVALID 2392139
const LL MAX = 300005;
const LL minim = -1000 * 1000 - 1;
const LL zsuv = MAX;
using namespace std;
using namespace __gnu_pbds;
const int mod = 1000 * 1000 * 1000 + 7;
int idxes[100005] , x;
LL b[100005] , l[100005] , u[100005];
bool cmp(int i , int j)
{
	if( (x - b[i]) * (LL)u[i] + b[i] * (LL)l[i] == (x - b[j]) * (LL)u[j] + b[j] * (LL)l[j])
    {
      return l[i] < l[j];
    }
  	return (x - b[i]) * (LL)u[i] + b[i] * (LL)l[i] > (x - b[j]) * (LL)u[j] + b[j] * (LL)l[j]
}

int main()
{
	int n;
	cin >> n >> x;
	LL suma = 0;
	for(int i = 0; i < n; i++)
	{
		cin >> b[i] >> l[i] >> u[i];
		suma -= b[i] * (LL)(l[i]);
		idxes[i] = i;
	}
	
	sort(idxes , idxes + n , cmp);
	LL ans = 0;
	LL bestAns = LINF;
	for(int i = 0; i < n; i++)
	{
		int j = idxes[i];
		if(suma + (x - b[j]) * u[j] + l[j] * b[j] >= 0)
		{
			for(int k = 1; k <= x; k++)
			{
				if(k <= b[j])
				{
					if(suma + l[j] * k >= 0)
					{
						//cout << ans + k;
						bestAns = min(bestAns , ans + k);
						//return 0;
					}
				}
				else
				{
					if(suma + (k - b[j]) * u[j] + l[j] * b[j] >= 0)
					{
						bestAns = min(bestAns , ans + k);
						//return 0;
					}
				}
			}
		}
		else
		{
			ans += x;
			suma += (x - b[j]) * u[j] + l[j] * b[j];
		}
	}
	cout << bestAns << endl;
	//cout << ans;
}


Compiler output:
a.cc: In function 'bool cmp(int, int)':
a.cc:27:97: error: expected ';' before '}' token
   27 |         return (x - b[i]) * (LL)u[i] + b[i] * (LL)l[i] > (x - b[j]) * (LL)u[j] + b[j] * (LL)l[j]
      |                                                                                                 ^
      |                                                                                                 ;
   28 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
    int n,a,b,c,d,z=1;
    string s;
    cin>>n>>a>>b>>c>>d>>s;
    if(c<d){
        for(int i=a-1;i<c-1;i++) if(s[i]=='#'&&s[i+1]=='#') z=0;
        for(int i=b-1;i<d-1;i++) if(s[i]=='#'&&s[i+1]=='#') z=0;
        if(z) cout<<"Yes";
        else cout<<"No";
    }
    else{
        for(int i=a-1;i<c-1;i++) if(s[i]=='#'&&s[i+1]=='#') z=0;
        if(z){
            int i=b-1;
          if(b==d-1&&s[b+1]=='#') cout<<"No";
          else{
          else if(s[b]=='#') i+=2;
          else{
            while(s[i]=='.') i--;
            i++;
          }
            int x=0,y=0;
            while(i<d+1){
                y=0;
                while(s[i]=='.') y++,i++;
                x=max(x,y);
                i++;
            }
            if(x>2) cout<<"Yes";
            else cout<<"No";
          }
        }
        else cout<<"No";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: expected '}' before 'else'
   20 |           else if(s[b]=='#') i+=2;
      |           ^~~~
a.cc:19:15: note: to match this '{'
   19 |           else{
      |               ^
a.cc:20:11: error: expected '}' before 'else'
   20 |           else if(s[b]=='#') i+=2;
      |           ^~~~
a.cc:16:14: note: to match this '{'
   16 |         if(z){
      |              ^
a.cc:20:30: error: 'i' was not declared in this scope
   20 |           else if(s[b]=='#') i+=2;
      |                              ^
a.cc:22:21: error: 'i' was not declared in this scope
   22 |             while(s[i]=='.') i--;
      |                     ^
a.cc:23:13: error: 'i' was not declared in this scope
   23 |             i++;
      |             ^
a.cc:26:19: error: 'i' was not declared in this scope
   26 |             while(i<d+1){
      |                   ^
a.cc: At global scope:
a.cc:36:9: error: expected unqualified-id before 'else'
   36 |         else cout<<"No";
      |         ^~~~
a.cc:37:5: error: expected declaration before '}' token
   37 |     }
      |     ^
a.cc:38:1: error: expected declaration before '}' token
   38 | }
      | ^
Language: C

#include<stdio.h>

int main(void){

    int n,a,b,c,d;

    char str[200000];

    int i,j;//制御
    int hantei,hantei2,hantei3;

    scanf("%d %d %d %d %d",&n,&a,&b,&c,&d);
    scanf("%s",str);

    if(c<d){
        for(i=1;i<d;i++){
            if(str[i]=='#'&&str[i-1]=='#'){
                hantei=0;//hantei=0はno
                break;
            }
            else{
                hantei=1;
            }
        }
        if(hantei==0){
            printf("No");
        }
        else{
            printf("Yes");
        }

    }
    else{
        str[d-1]='#';
        for(i=2;i<d;i++){
            if(str[i-2]=='.'&&str[i-1]=='.'&&str[i]=='.'){
                hantei=1;
                break;
                //printf("koko1");
            }
            else{
                hantei=0;
               // printf("koko2");
            }
        }
        for(i=d+1;i<c;i++){
             if(str[i]=='#'&&str[i-1]=='#'){
                hantei3=0;//hantei=0はno
               // printf("koko3");
                break;}
                else 
                hantei3=1;
            }
        for(i=1;i<d;i++){
             if(str[i]=='#'&&str[i-1]=='#'){
                hantei2=0;//hantei=0はno
               // printf("koko3");
                break;
            }
            else{
                hantei2=1;
               // printf("koko4");
            }
        }
        if(hantei==1&&hantei2==0&&hatei!=0){
            printf("Yes");
        }
        else if(hantei==1&&hantei2==1&&hantei3!=0){
            printf("Yes");
        }
        else if(hantei==0&&hantei2==1&&hantei3!=0){
            printf("Yes");  
            }
            else if(hantei3==0){
                printf("No");
            }
        else{
            printf("No");
        }
        
    }
    
    



    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:65:35: error: 'hatei' undeclared (first use in this function); did you mean 'hantei'?
   65 |         if(hantei==1&&hantei2==0&&hatei!=0){
      |                                   ^~~~~
      |                                   hantei
main.c:65:35: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){

    int n,a,b,c,d;

    char str[200000];

    int i,j;//制御
    int hantei,hantei2,hantei3;

    scanf("%d %d %d %d %d",&n,&a,&b,&c,&d);
    scanf("%s",str);

    if(c<d){
        for(i=1;i<d;i++){
            if(str[i]=='#'&&str[i-1]=='#'){
                hantei=0;//hantei=0はno
                break;
            }
            else{
                hantei=1;
            }
        }
        if(hantei==0){
            printf("No");
        }
        else{
            printf("Yes");
        }

    }
    else{
        str[d-1]='#';
        for(i=2;i<d;i++){
            if(str[i-2]=='.'&&str[i-1]=='.'&&str[i]=='.'){
                hantei=1;
                break;
                //printf("koko1");
            }
            else{
                hantei=0;
               // printf("koko2");
            }
        }
        for(i=d+1;i<c;i++){
             if(str[i]=='#'&&str[i-1]=='#'){
                hantei3=0;//hantei=0はno
               // printf("koko3");
                break;}
                else 
                hantei3=1;
            }
        for(i=1;i<d;i++){
             if(str[i]=='#'&&str[i-1]=='#'){
                hantei2=0;//hantei=0はno
               // printf("koko3");
                break;
            }
            else{
                hantei2=1;
               // printf("koko4");
            }
        }
        if(hantei==1&&hantei2==0&&ahntei!=0){
            printf("Yes");
        }
        else if(hantei==1&&hantei2==1&&hantei3!=0){
            printf("Yes");
        }
        else if(hantei==0&&hantei2==1&&hantei3!=0){
            printf("Yes");  
            }
            else if(hantei3==0){
                printf("No");
            }
        else{
            printf("No");
        }
        
    }
    
    



    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:65:35: error: 'ahntei' undeclared (first use in this function); did you mean 'hantei'?
   65 |         if(hantei==1&&hantei2==0&&ahntei!=0){
      |                                   ^~~~~~
      |                                   hantei
main.c:65:35: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

(C++) _ ブラウザでプログラミング・実行ができる「オンライン実行環境」_ paiza.IO

Compiler output:
a.cc:1:9: error: extended character 「 is not valid in an identifier
    1 | (C++) _ ブラウザでプログラミング・実行ができる「オンライン実行環境」_ paiza.IO
      |         ^
a.cc:1:9: error: extended character 」 is not valid in an identifier
a.cc:1:3: error: expected ')' before '++' token
    1 | (C++) _ ブラウザでプログラミング・実行ができる「オンライン実行環境」_ paiza.IO
      | ~ ^~
      |   )
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,a,b,c,d;
  string s;
  int count=0;
  cin>>n>>a>>b>>c>>d>>s;
  string ans="Yes";
  for(int i=min(a-1,b-1);i<max(c-1,d-1)-1;i++){
      if(s.at(i)=='#'){count++;}
    if(s.at(i)=='#'&&s.at(i+1)=='#'){
      ans="No"; break;}
  }
  if(ans=="Yes"&&c>d){
      //開幕追い抜ける場合が抜けている
    for(int i=b-1;i+1<d;i++){
        if(s.at(i)=='.'&&s.at(i+1)=='.'&&s.at(i+2)=='.'){break;}
        else if(i==d-2){ans="No"; break;}//追い越せるポイントがなかったのでNoになる
    }
  }
  if(count==1;){ans="Yes";}
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: expected primary-expression before ')' token
   21 |   if(count==1;){ans="Yes";}
      |               ^
Language: C++

#include <iostream>

using namespace std;

int canMove(int& pos, int& dest, int& n, const std::string& s)
{
    // 2マス先
    //cout << s << " --> ";
    int newpos;
    char c;
    int ret = 0;
    if(pos+2<=n){
        newpos = pos+2;
        c = s[pos+1];
        ret = 2;
    }else{
        newpos = pos+1;
        c = s[pos]; 
        ret = 1;
    }
    if(newpos <= n && newpos <= dest && c != '#' && c != 'A' && c] != 'B'){
        //cout << "(2)";
        return ret;
    }else{
        //cout << "(0)";
        return 0;
    }
}

int main()
{
    int n,a,b,c,d;
    std::string s;
    cin >> n >> a >> b >> c >> d;
    cin >> s;
    s[a-1] = 'A';
    s[b-1] = 'B';
    bool oikoshi = false;

    while(1){
        int next_a = a;
        int next_b = b;
        std::string tmps = s;
        
        next_a += canMove(a,c,n,tmps);
        if(next_a != a){
            tmps[a-1] = '.';
            tmps[next_a-1] = 'A';
            a = next_a;
        }
        
        if(oikoshi == true){
            if(a > b){
                oikoshi = false;
            }
            goto NEXT;
        }
        if(c > d && a < b){
            if(s[b] == '.' && s[b+1] == '.'){
                oikoshi = true;
                next_b++;
                tmps[b-1] = '.';
                tmps[next_b-1] = 'B';
                b = next_b;
                }
                goto NEXT;
            }
        }
        next_b += canMove(b,d,n,tmps);
        if(next_b != b){
            tmps[b-1] = '.';
            tmps[next_b-1] = 'B';
            b = next_b;
        }
NEXT:
        //cout << tmps << endl;
        
        if(a == c && b == d){
            cout << "Yes" << endl;
            return 0;
        }
        if(s == tmps){
            cout << "No" << endl;
            return 0;
        }
        s = tmps;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int canMove(int&, int&, int&, const std::string&)':
a.cc:21:66: error: expected ')' before ']' token
   21 |     if(newpos <= n && newpos <= dest && c != '#' && c != 'A' && c] != 'B'){
      |       ~                                                          ^
      |                                                                  )
a.cc:21:66: error: expected primary-expression before ']' token
a.cc: In function 'int main()':
a.cc:69:9: error: 'next_b' was not declared in this scope
   69 |         next_b += canMove(b,d,n,tmps);
      |         ^~~~~~
a.cc:69:33: error: 'tmps' was not declared in this scope; did you mean 'tm'?
   69 |         next_b += canMove(b,d,n,tmps);
      |                                 ^~~~
      |                                 tm
a.cc: At global scope:
a.cc:88:5: error: expected unqualified-id before 'return'
   88 |     return 0;
      |     ^~~~~~
a.cc:89:1: error: expected declaration before '}' token
   89 | }
      | ^
a.cc: In function 'int canMove(int&, int&, int&, const std::string&)':
a.cc:28:1: warning: control reaches end of non-void function [-Wreturn-type]
   28 | }
      | ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#define rep(i,x) for(i;i<x;i++)

using namespace std;
int main(){
	string S;
  int N,A,B,C,D;
  cin>>N>>A>>B>>C>>D;
  cin>>S;
  int goal=max(C,D);
  int i=min(A,B);
 
  
  int muri=0;
  if(A>B && C<D){
  	muri=1;
  	
  }
  int count=0;
  int hantei=0;
  int ten=-1;
  int once=0;
  int max_count=0;
  
  rep(i,goal){
    
    
  	if(S[i-1]=='#'){
    	if(S[i]=='#' && i<S.size()){
        	hantei=1;	
          break;
        }else if(count>0){  
          	if(count>2 && muri==1){
            	if(i<D){ten=1;}
            }else if(count>2 && muri==0){
            	if(i<C){ten=1;}
            }
        }
      	max_count=max(count,max_count);
      	count=0;
    
    }else {
    	count++;
      //cout<<count<<' '<<i<<endl;
    }
    
  }
    
  max_count=max(max_count,count);
  
  if(muri){
  	if(hantei){
    	cout<<"No";
    }else if(ten){
      cout<<"Yes";
    }else if(ten==0){
      cout"No";
    }else if(max_count>2){
    	cout<<"Yes";
    }else{
    	cout<<"No";
    }
  }else{
    if(hantei){
    	cout<<"No";
    }else if(max_count>0){
      cout<<"Yes";
    }else{
    	cout<<"Yes";
    }
   }
    
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:11: error: expected ';' before string constant
   59 |       cout"No";
      |           ^~~~
      |           ;
Language: C

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

#define MAX_N 20001
int N, C, D;
char S[MAX_N];
static char memo0[MAX_N];
static char memo1[MAX_N][MAX_N];

bool search0(int i, int j) {
  //printf("i=%d j=%d S[i-1]=%c\n", i, j, S[i-1]);
  if(i > j)  return false;
  if(memo0[i-1] != 0) {
    return (memo0[i-1] == 1) ? true : false;
  }
  if(S[i-1] == '#') return false;
  if(i == j) return true;
  
  bool ret0 = search0(i+1, j);
  bool ret1 = search0(i+2, j);
  if(ret0 == true || ret1 == true) {
    memo0[i-1] = 1;
    return true;
  } else {
    memo0[i-1] = 2;
    return false;
  }
}

bool search(int a, int b) {
  if(memo[a-1][b-1] != 0) {
    return (memo[a-1][b-1] == 1) ? true : false;
  }
  if(((a < b) && (C < D)) || ((b < a) && (D < C))) {
    bool ret0 = search0(a, C);
    bool ret1 = search0(b, D);
    return (ret0 && ret1);
  }
  if(a == b) return false;
  if(a > C)  return false;
  if(b > D)  return false;
  if((b < a) && (C < D)) return false;

  if(S[a-1] == '#') return false;
  if(S[b-1] == '#') return false;
  if(a == C && b == D) return true;

  if(search(a+1, b)) {
    memo[a-1][b-1] = 1;
    return true;
  }
  if(search(a+2, b)) {
    memo[a-1][b-1] = 1;
    return true;
  }
  if(search(a, b+1)) {
    memo[a-1][b-1] = 1;
    return true;
  }    
  if(search(a, b+2)) {
    memo[a-1][b-1] = 1;
    return true;
  }    

  memo[a-1][b-1] = 2;
  return false;
}

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

  if(search(A, B)) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  return 0;
}


Compiler output:
main.c: In function 'search':
main.c:33:6: error: 'memo' undeclared (first use in this function); did you mean 'memo1'?
   33 |   if(memo[a-1][b-1] != 0) {
      |      ^~~~
      |      memo1
main.c:33:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(){
  int n, a, b, c, d;
  int A, B;
  char s[200000];

  scanf("%d%d%d%d%d", &n, &a, &b, &c, &d);
  scanf("%s", s);

  A = a-1;
  B = b-1;h
  s[A] = 'A';
  s[B] = 'B';

  // 先にBをできるだけ後ろに動かす
  while(B < n && B <= (d-1)){
    if(s[B + 1] == '.'){
      s[B] = '.';
      B = B + 1;
      s[B] = 'B';
    }else if(s[B + 2] == '.'){
      s[B] = '.';
      B = B + 2;
      s[B] = 'B';
    }else if(B + 1 > n){
      break;
    }
  }

  while(A < (n-1) && A <= (c-1)){
    if(s[A + 1] == '.'){
      s[A] = '.';
      A = A + 1;
      s[A] = 'A';
    }else if(s[A + 2] == '.'){
      s[A] = '.';
      A = A + 2;
      s[A] = 'A';
    }else if(A + 1 > n){
      break;
    }
  }

  if(A == c && B == d){
    printf("Yes\n");
  }else{
    printf("No\n");
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:11: error: unknown type name 'h'
   13 |   B = b-1;h
      |           ^
main.c:14:3: error: conflicting types for 's'; have 'int[A]'
   14 |   s[A] = 'A';
      |   ^
main.c:7:8: note: previous declaration of 's' with type 'char[200000]'
    7 |   char s[200000];
      |        ^
main.c:14:10: error: variable-sized object may not be initialized except with an empty initializer
   14 |   s[A] = 'A';
      |          ^~~