Language: C++

#include<iostream>
using namespace std;
int main(){
	int N,A,B,C,D,cnt1,cnt2;
	char S[2000000];
	cin>>N>>A>>B>>C;
	for(int i=0;i<N;i++){
		cin>>S[i];
	}

	
	
	for(int i=0;i<N-1;i++){
		if(S[i]=="#"&&S[i+1]=="#"){
			cout<<"No"<<endl;
			return 0;
		}
	}
	int i=B-1;
	while(i<N-1){
		if(S[i+2]!="#"){
			if(i+1==D-1){
				S[i+1]="#";
				cnt1=1;
				break;
			}
			if(i+2==D-1){
				S[i+2]="#";
				cnt1=1;
				break;
			}
			i=i+2;
		}else{
			if(i+1==D-1){
				S[i+1]="#";
				cnt1=1;
				break;
			}
			i++;
		}
	}

	i=A-1;
	while(i<N-1){
		if(S[i+2]!="#"){
			if(i+1==C-1){
				S[i+1]="#";
				cnt2=1;
				break;
			}
			if(i+2==C-1){
				S[i+2]="#";
				cnt2=1;
				break;
			}
			i=i+2;
		}else{
			if(i+1==C-1){
				S[i+1]="#";
				cnt2=1;
				break;
			}
			i++;
		}
	}

	if(cnt1+cnt2==2){
		cout<<"Yes"<<endl;
	}else{
		cout<<"No"<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                 if(S[i]=="#"&&S[i+1]=="#"){
      |                    ~~~~^~~~~
a.cc:14:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                 if(S[i]=="#"&&S[i+1]=="#"){
      |                               ~~~~~~^~~~~
a.cc:21:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |                 if(S[i+2]!="#"){
      |                    ~~~~~~^~~~~
a.cc:23:40: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   23 |                                 S[i+1]="#";
      |                                        ^~~
      |                                        |
      |                                        const char*
a.cc:28:40: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   28 |                                 S[i+2]="#";
      |                                        ^~~
      |                                        |
      |                                        const char*
a.cc:35:40: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   35 |                                 S[i+1]="#";
      |                                        ^~~
      |                                        |
      |                                        const char*
a.cc:45:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   45 |                 if(S[i+2]!="#"){
      |                    ~~~~~~^~~~~
a.cc:47:40: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   47 |                                 S[i+1]="#";
      |                                        ^~~
      |                                        |
      |                                        const char*
a.cc:52:40: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   52 |                                 S[i+2]="#";
      |                                        ^~~
      |                                        |
      |                                        const char*
a.cc:59:40: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   59 |                                 S[i+1]="#";
      |                                        ^~~
      |                                        |
      |                                        const char*