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

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

typedef long long ll;

int main()
{
    int h, w;
    string ans = "Yes";
    cin >> h >> w;
    char s[52][52];

    rep(i, h)
            rep(j, w){
                 cin >>s[i + 1][j + 1];
            }

            forx(i, 1, h + 1)
                forx(j, 1, w + 1) if (s[i][j] == '#' && c[i][j - 1] != '#' && s[i - 1][j] != '#' && s[i][j + 1] != '#' && s[i + 1][j] != '#')
            {
                ans == "No";
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:57: error: 'c' was not declared in this scope
   21 |                 forx(j, 1, w + 1) if (s[i][j] == '#' && c[i][j - 1] != '#' && s[i - 1][j] != '#' && s[i][j + 1] != '#' && s[i + 1][j] != '#')
      |                                                         ^
a.cc:23:21: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   23 |                 ans == "No";
      |                 ~~~~^~~~~~~
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:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
Language: C++

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

typedef long long ll; 

int main()
{ 
    int h,w;
    string ans="Yes";
    vector<vector<char>>s(55,vector<char>(55));
    
    rep(i,h)
    rep(j,w)
    cin>>s[i+1][j+1];
    
    forx(i,1,1+h)
    forx(j,1,1+w)
      if((s[i][j]=='#'&&s[i-1][j]!='#')   ||  (s[i][j]=="#"&&s[i+1][j]!='#')   ||   (s[i][j]=='#'&&s[i][j+1]!='#')   ||   (s[i][j]=='#'&&s[i][j-1]!='#')ans="No";
        
   cout<<ans<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:55: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |       if((s[i][j]=='#'&&s[i-1][j]!='#')   ||  (s[i][j]=="#"&&s[i+1][j]!='#')   ||   (s[i][j]=='#'&&s[i][j+1]!='#')   ||   (s[i][j]=='#'&&s[i][j-1]!='#')ans="No";
a.cc:20:153: error: expected ';' before 'ans'
   20 |       if((s[i][j]=='#'&&s[i-1][j]!='#')   ||  (s[i][j]=="#"&&s[i+1][j]!='#')   ||   (s[i][j]=='#'&&s[i][j+1]!='#')   ||   (s[i][j]=='#'&&s[i][j-1]!='#')ans="No";
      |                                                                                                                                                         ^~~
      |                                                                                                                                                         ;
a.cc:22:19: error: expected ')' before ';' token
   22 |    cout<<ans<<endl;
      |                   ^
      |                   )
a.cc:20:9: note: to match this '('
   20 |       if((s[i][j]=='#'&&s[i-1][j]!='#')   ||  (s[i][j]=="#"&&s[i+1][j]!='#')   ||   (s[i][j]=='#'&&s[i][j+1]!='#')   ||   (s[i][j]=='#'&&s[i][j-1]!='#')ans="No";
      |         ^
Language: C++

#include <iostream>
using namespace std;

int main(void){
    int H,W,c,i,j;
    char S[60][60];
    cin>>H>>W;
    for(i=0;i<H;i++){
        for(j=0;j<W;j++){
            cin>>S[i][j];
        }
    }
    for(int i=1;i<H;i++){
        for(int j=1;j<W;j++){
            if(S[i][j]!=S[i-1][j]&&S[i][j]!=S[i+1][j]&&S[i][j]!=S[i][j-1]&&S[i][j]!=S[i][j+1]){
                c++;
        }
    }
    if(c!=0){
        cout<<"No";
    }
    else{
        cout<<"Yes";
    }
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:25:6: error: expected '}' at end of input
   25 |     }
      |      ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

#include<iostream>
using namespace std;

int main(void){
    // Your code here!
    int H,W,c,i,j;
    char S[i][j];
    cin>>H>>W;
    for(i=0;i<H;i++){
        for(j=0;j<W;j++){
            cin>>S[i][j];
        }
    }
    for(int i=1;i<H;i++){
        for(int j=1;j<W;j++){
            if(S[i][j]!=S[i-1][j]&&S[i][j]!=S[i+1][j]&&S[i][j]!=S[i][j-1]&&S[i][j]!=S[i][j+1]){
                c++;
        }
    }
    if(c!=0){
        cout<<"No";
    }
    else{
        cout<<"Yes";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

#include <iostream>
using namespace std;

int main(void){
    // Your code here!
    int H,W,c,i,j;
    char S[i][j];
    cin>>H>>W;
    for(i=0;i<H;i++){
        for(j=0;j<W;j++){
            cin>>S[i][j];
        }
    }
    for(int i=1;i<H;i++){
        for(int j=1;j<W;j++){
            if(S[i][j]!=S[i-1][j]&&S[i][j]!=S[i+1][j]&&S[i][j]!=S[i][j-1]&&S[i][j]!=S[i][j+1]){
                c++;
        }
    }
    if(c!=0){
        cout<<"No";
    }
    else{
        cout<<"Yes";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

include <iostream>
using namespace std;

int main()
{
  int h, w;
  cin >> h >> w;
  string camp[55];
  for (int i = 0 ; i < h; i++) {
    cin >> camp[i];
  }
  
  int dh[4] = {1,  0,  -1,  0};
  int dw[4] = {0,  1,   0, -1};
  
  bool can = true;
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      bool can2 = false;
      if (camp[i][j] == '#') {
        for (int k = 0 ; k < 4; k++) {
          int nh = i + dh[k];
          int nw = j + dw[k];
          if (nh < 0 || nh >= h) continue;
          if (nw < 0 || nw >= w) continue;
          if (camp[nh][nw] == '#') can2 = true;
        }
        if (can2 = false)
          can = false;
      }
      if (can = false)
        break;
    }
  }  
  if (can) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> h >> w;
      |   ^~~
a.cc:8:3: error: 'string' was not declared in this scope
    8 |   string camp[55];
      |   ^~~~~~
a.cc:10:12: error: 'camp' was not declared in this scope
   10 |     cin >> camp[i];
      |            ^~~~
a.cc:20:11: error: 'camp' was not declared in this scope
   20 |       if (camp[i][j] == '#') {
      |           ^~~~
a.cc:36:5: error: 'cout' was not declared in this scope
   36 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:36:22: error: 'endl' was not declared in this scope
   36 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:38:5: error: 'cout' was not declared in this scope
   38 |     cout << "No" << endl;
      |     ^~~~
a.cc:38:21: error: 'endl' was not declared in this scope
   38 |     cout << "No" << endl;
      |                     ^~~~
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main() {
	int H, W, ans = 0;
	char s[50][50];

	cin >> H >> W;

	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) {
			cin >> s[i][j];
		}
	}

	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) {
			if (s[i][j] == '#' && s[i][j - 1] == '.' && s[i][j + 1] == '.' && s[i - 1][j] == '.' && s[i + 1][j] = '.') {
				ans++;
			}
		}
	}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:20:110: error: lvalue required as left operand of assignment
   20 |                         if (s[i][j] == '#' && s[i][j - 1] == '.' && s[i][j + 1] == '.' && s[i - 1][j] == '.' && s[i + 1][j] = '.') {
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
Language: Java

public class c {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s=new Scanner(System.in);
		int H=s.nextInt();
		int W=s.nextInt();
		String c[]=new String[H+1];
		int count=0;
	
		for(int i=0;i<=H;i++){
				c[i]=s.nextLine();
		}

		for(int i=2;i<H;i++){
			for(int j=1;j<W-1;j++){
				if(c[i+1].charAt(j)==c[i].charAt(j))continue;
				if(c[i].charAt(j+1)==c[i].charAt(j))continue;
				System.out.print("No");
				count++;
				break;
				}
			if(count!=0)break;
			}
		if(count==0)System.out.print("Yes");
	
		}

	}


Compiler output:
Main.java:1: error: class c is public, should be declared in a file named c.java
public class c {
       ^
Main.java:5: error: cannot find symbol
		Scanner s=new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class c
Main.java:5: error: cannot find symbol
		Scanner s=new Scanner(System.in);
		              ^
  symbol:   class Scanner
  location: class c
3 errors
Language: C++

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

int main()
{
    bool flag = 1 ;
    int H , W ;
    cin >> H >> W ;
    string Pic[W+2];
    string frame;
    for(int i = 0 ; i < H+2 ; i++)
        frame += "." ;
    Pic[0] = frame ;
    Pic[W+1] = frame ;

    for(int i = 1 ; i <= H ; i++)
    {
        cin >> Pic[i] ;
        Pic[i] = "." + Pic[i] + "." ;
    }

    for(int i = 1 ; i <= W ; i++)
    {
        for(int j = 1 ; j <= H ; j++)
        {
            if(Pic[i][j] == "#")
            {
                if(Pic[i+1][j] == "#" || Pic[i-1][j] == "#" || Pic[i][j+1] == "#" || Pic[i][j-1] == "#")
                {
                flag = 1 ;
                }
                else
                {
                cout << "No" << endl ;
                return 0;
                }
            }
        }
    }
    if(flag == 1)
    cout << "Yes" << endl ;
    else
    cout << "No" << endl ;

    return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |             if(Pic[i][j] == "#")
a.cc:29:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   29 |                 if(Pic[i+1][j] == "#" || Pic[i-1][j] == "#" || Pic[i][j+1] == "#" || Pic[i][j-1] == "#")
a.cc:29:54: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   29 |                 if(Pic[i+1][j] == "#" || Pic[i-1][j] == "#" || Pic[i][j+1] == "#" || Pic[i][j-1] == "#")
a.cc:29:76: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   29 |                 if(Pic[i+1][j] == "#" || Pic[i-1][j] == "#" || Pic[i][j+1] == "#" || Pic[i][j-1] == "#")
a.cc:29:98: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   29 |                 if(Pic[i+1][j] == "#" || Pic[i-1][j] == "#" || Pic[i][j+1] == "#" || Pic[i][j-1] == "#")
Language: C++

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

int main()
{
    bool flag = 0 ;
    int H , W ;
    cin >> H >> W ;
    string Pic[H+2];
    string frame ;
    for(int i = 0 ; i < W+2 ; i++)
    frame[0][i] = "." ;
    Pic[0] = frame ;
    Pic[W+1] = frame ;

    for(int i = 1 ; i <= H ; i++)
    {
        cin >> Pic[i] ;
        Pic[i] = "." + Pic[i] + "." ;
    }

    for(int i = 1 ; i <= H ; i++)
    {
        for(int j = 1 ; j <= W ; j++)
        {
            if(Pic[i][j] == '#')
            {
                if(Pic[i+1][j] == '#' || Pic[i-1][j] == '#' || Pic[i][j+1] == '#' || Pic[i][j-1] == '#')
                {
                flag = 1 ;
                }
                else
                {
                flag = 0 ;
                break ;
                }
            }
        }
        if(flag == 0)
        break ;

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

    return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   13 |     frame[0][i] = "." ;
      |             ^
Language: C++

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

int main()
{
    bool flag = 0 ;
    int H , W ;
    cin >> H >> W ;
    string Pic[H+2];
    string frame ;
    for(int i = 0 ; i < W+2 ; i++)
    frame[i] = "." ;
    Pic[0] = frame ;
    Pic[W+1] = frame ;

    for(int i = 1 ; i <= H ; i++)
    {
        cin >> Pic[i] ;
        Pic[i] = "." + Pic[i] + "." ;
    }

    for(int i = 1 ; i <= H ; i++)
    {
        for(int j = 1 ; j <= W ; j++)
        {
            if(Pic[i][j] == '#')
            {
                if(Pic[i+1][j] == '#' || Pic[i-1][j] == '#' || Pic[i][j+1] == '#' || Pic[i][j-1] == '#')
                flag = 1 ;
                else
                {
                flag = 0 ;
                break ;
                }
            }
        }
        if(flag == 0)
        break ;

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

    return 0 ;
}

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

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <set>
#include <algorithm>
#include <array>
#include <complex>
#include <utility>
#include <map>
int needleX[4] = { -1,0,1,0 };
int needleY[4] = { 0,1,0,-1 };

int main(void) {
    int h,w;
    std::cin >> h>> w;
    char a[52][52];
    
    for(int i=1;i<=h;i++){
        for(int j=1;j<=w;j++){
            std::cin >> a[i][j];
        }
    }
    bool make=true;
    for(int i=1;i<=h;i++){
        for(int j=1;j<=w;j++){
            if(c[i][j]=='#'&&c[i-1][j]!='#'&&c[i+1][j]!='#'&&c[i][j-1]!='#'&&c[i][j+1]!='#'){
                make=false;
            }
        }
    }
    if(make){
        std::cout << "Yes" << std::endl;
    }else{
        std::cout << "No" << std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:16: error: 'c' was not declared in this scope
   27 |             if(c[i][j]=='#'&&c[i-1][j]!='#'&&c[i+1][j]!='#'&&c[i][j-1]!='#'&&c[i][j+1]!='#'){
      |                ^
Language: C++

#include<stdio.h>
int main() {
	int h, w;
	scanf("%d", &h, &w);
	char x[52][52] = {};
	for (int i = 1; i <= w; i++) {
		scanf("%s", &x[j]);
	}
	int c;
	bool y = true;
	for (int i = 1; i <= w; i++) {
		for (int j = 1; j <= h; j++) {
			if (x[j][i] == '#') {
				if (x[j + 1][i] == '#' ||
					x[j - 1][i] == '#' ||
					x[j][i + 1] == '#' ||
					x[j][i - 1] == '#');
				else {
					y = false;
				}

			}
		}
	}
	if (y == true) {
		printf("Yes\n");
	}
	else {
		printf("No\n");
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:32: error: 'j' was not declared in this scope
    7 |                 scanf("%s", &x[j]);
      |                                ^
Language: C++

#include <iostream>
using namespace std;
int DIRX[4] = {-1,0,1,0};
int DIRY[4] = {0,-1,0,1};

int main(){
	int h,w;
	char board[50][50];
	cin >> h >> w;
	for(int i = 0;i < h;i++){
		for(int j = 0;j < w;j++){
			cin >> board[j][i];
		}
	}

	for(int i = 0;i < h;i++){
		for(int j = 0;j < w;j++){
			if(board[j][i] != '#')continue;
			bool x = 0;
			for(int k = 0;k < 4;k++){
				int nx = j + DIRX[k];
				int ny = i + DIRY[k];
				if(nx < 0 || ny < 0 || nx >= w || ny >= h)continue;
				if(board[nx][ny] == '#')x= 1;
			}
			if(!xs){cout << "No" << endl;return 0;}
		}
	}
	cout << "Yes" << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:29: error: 'xs' was not declared in this scope; did you mean 'x'?
   26 |                         if(!xs){cout << "No" << endl;return 0;}
      |                             ^~
      |                             x
Language: C++

using namespace std;
int main() {
	int i,j,k,h,w;
	bool tf;
	char a[52][52];
	cin>>h>>w;
	memset(a,'.',sizeof(a));
	//for(i=1;i<=50;i++)
	  //  for(j=1;j<=50;j++)a[i][j]='.';
	for(i=1;i<=h;i++){
	    for(j=1;j<=w;j++)cin>>a[i][j];
    }  
    for(i=1;i<=h;i++)
        for(j=1;j<=w;j++){
        	if(a[i][j]=='#'){
        	if(a[i+1][j]=='#'||a[i-1][j]=='#'||a[i][j-1]=='#'||a[i][j+1]=='#')tf=true;else{tf=false;cout<<"no";return 0;}
		    }
	}
	cout<<"yes";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>h>>w;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:7:9: error: 'memset' was not declared in this scope
    7 |         memset(a,'.',sizeof(a));
      |         ^~~~~~
a.cc:1:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | using namespace std;
a.cc:16:105: error: 'cout' was not declared in this scope
   16 |                 if(a[i+1][j]=='#'||a[i-1][j]=='#'||a[i][j-1]=='#'||a[i][j+1]=='#')tf=true;else{tf=false;cout<<"no";return 0;}
      |                                                                                                         ^~~~
a.cc:16:105: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout<<"yes";
      |         ^~~~
a.cc:19:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
#include <string>
using namespace std;
const double PI = acos(-1.0);
const string alp = "abcdefghijklmnopqrstuvwxyz";
const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define SUM(c) accumulate((c).begin(),(c).end(),0)
#define Yn(b) puts(b?"Yes":"No")
#define YN(b) puts(b?"YES":"NO")

int main(){
  string s[50];
  int h,w,c;
  cin >> h >> w;
  REP(i,h){
    cin >> s[i];
  }
  REP(i,h){
    REP(j,w){
      c = 0;
      if (i>0) {
        if (s[i-1][j]=="#") c++;
      }
      if (i<h) {
        if (s[i+1][j]=="#") c++;
      }
      if (j>0) {
        if (s[i][j-1]=="#") c++;
      }
      if (j<w) {
        if (s[i][j+1]=="#") c++;
      }
      if (!c) {
        cout << "No";
        return 0;
      }
    }
  }
  cout << "Yes";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   30 |         if (s[i-1][j]=="#") c++;
a.cc:33:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   33 |         if (s[i+1][j]=="#") c++;
a.cc:36:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   36 |         if (s[i][j-1]=="#") c++;
a.cc:39:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   39 |         if (s[i][j+1]=="#") c++;
Language: C++

#include<math.h> 
#include<string.h>
#include<stdio.h>
using namespace std;
char a[50][50];
int main()
{
int m,n;
cin>>m>>n;
for(int i=0;i<m;i++)
{
for(int j=0;j<n;j++)
{
cin>>a[i][j];
}
}
for(int i=0;i<m;i++)
for(int j=0;j<n;j++)
{
if(a[i][j]=='#'&&a[i+1][j]!='#'&&a[i-1][j]!='#'&&a[i][j-1]!='#'&&a[i][j+1]!='#')
{
cout<<"No";
system ("pause");
return 0;
}
}
cout<<"Yes";
system ("pause");
return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'cin' was not declared in this scope
    9 | cin>>m>>n;
      | ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<stdio.h>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:22:1: error: 'cout' was not declared in this scope
   22 | cout<<"No";
      | ^~~~
a.cc:22:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:1: error: 'cout' was not declared in this scope
   27 | cout<<"Yes";
      | ^~~~
a.cc:27:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
using namespace std;
char map[55][55];
int main(){
    int n,m;
    cin>>n>>m;
    for(int i=1;i<=n;i++)scanf("%s",map[i]+1);
    int flag=1;
    cnt=0;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
            if(map[i][j]=='#'){
                cnt++;
                if(map[i-1][j]=='#'||map[i][j-1]=='#'||map[i][j-1]=='#'||map[i][j-1]=='#')flag=1;
                else flag=0;
            }
        }
    }
    if(flag||cnt==1)cout<<"Yes";
    else cout<<"No";
    return 0;    
}


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

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int h,w;
	cin>>h>>w;
	string s[52];
	for(int i=0;i<h;i++) cin>>s[i];
	for(int i=0;i<h;i++)
	for(int j=0;j<=w;j++)
	{
		if(a[i][j]=='#')
		if(i!=0){if(a[i-1][j]=='#')continue;}
		if(i!=h-1){if(a[i+1][j]=='#')continue;}
		if(j!=0){if(a[i][j-1]=='#')continue;}
		if(j!=w-1){if(a[i][j+1]=='#')continue;}
		cout<<"No";
		return 0;
	}
	cout<<"Yes";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: 'a' was not declared in this scope
   13 |                 if(a[i][j]=='#')
      |                    ^
a.cc:15:31: error: 'a' was not declared in this scope
   15 |                 if(i!=h-1){if(a[i+1][j]=='#')continue;}
      |                               ^
a.cc:16:29: error: 'a' was not declared in this scope
   16 |                 if(j!=0){if(a[i][j-1]=='#')continue;}
      |                             ^
a.cc:17:31: error: 'a' was not declared in this scope
   17 |                 if(j!=w-1){if(a[i][j+1]=='#')continue;}
      |                               ^
Language: C++

#include<bits\stdc++.h>
using namespace std;
int main()
{
	int h,w;
	cin>>h>>w;
	string a[52];
	for(int i=0;i<h;i++)
	{
		cin>>a[i];
	}
	for(int i=0;i<h;i++)
	{
		for(int j=0;j<w;j++)
		{
			if(a[i][j]=='#')
			{
				if(i!=0){if(a[i-1][j]=='#') continue;}
				if(i!=h-1){if(a[i+1][j]=='#') continue;}
				if(j!=0){if(a[i][j-1]=='#') continue;}
				if(j!=w-1){if(a[i][j+1]=='#') continue;}
			}
			else
			{
				cout<<"NO";
				return 0;
			}
		}
	}
	cout<<"yes";
	return 0;
} 

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

#include <bits/stdc++.h>
2.using namespace std;
3.int main(){
4.	int a,b;
5.	cin>>a>>b;
6.	char k[51][51];
7.	for(int i=0;i<a;i++){
8.		cin>>k[i];
9.	}
10.	for(int i=0;i<a;i++){
11.		for(int j=0;j<b;j++){
12.			if(k[i][j]='#'){
13.				if(k[i-1][j]!='#'&&k[i][j-1]!='#'&&k[i+1][j]!='#'&&k[i][j+1]!='#'){
14.					cout<<"No";
15.					return 0;
16.			}
17.		}
18.	}
19.}
20.cout<<"Yes";
21. 
22.	
23.}

#include <bits/stdc++.h>
using namespace std;
int main(){
	int a,b;
	cin>>a>>b;
	char k[51][51];
	for(int i=0;i<a;i++){
		cin>>k[i];
	}
	for(int i=0;i<a;i++){
		for(int j=0;j<b;j++){
			if(k[i][j]='#'){
				if(k[i-1][j]!='#'&&k[i][j-1]!='#'&&k[i+1][j]!='#'&&k[i][j+1]!='#'){
					cout<<"No";
					return 0;
			}
		}
	}
}
cout<<"Yes";

	
}

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.using namespace std;
      | ^~~~~~~
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3.int main(){
      | ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
char s[N][N];
int dir[4][2]={0,1,1,0,0,-1,-1,0};
int a,b;
 
bool search(int x,int y){
    for(int i=0;i<4;i++){
        int xx = x+dir[i][0];
        int yy = y+dir[i][1];
        if(xx>=0&&xx<a&&y>=0&&y<b){
            if(s[xx][yy]=='#')
                return true;
        }
    }
    return false;
}
int main(){
    cin>>a>>b;
    for(int i=0;i<a;i++)
        for(int j=0;j<b;j++)
            cin>>s[i][j];
    for(int i=0;i<a;i++){
        for(int j=0;j<b;j++){
            if(s[i][j]=='#'){
                bool prime = search(i,j);
                if(!prime){
                    return 0*printf("No\n");
                }
            }
        }
    }
    printf("Yes\n");
    return 0;
}

Compiler output:
a.cc:3:8: error: 'N' was not declared in this scope
    3 | char s[N][N];
      |        ^
a.cc:3:11: error: 'N' was not declared in this scope
    3 | char s[N][N];
      |           ^
a.cc: In function 'bool search(int, int)':
a.cc:12:16: error: 's' was not declared in this scope
   12 |             if(s[xx][yy]=='#')
      |                ^
a.cc: In function 'int main()':
a.cc:22:18: error: 's' was not declared in this scope
   22 |             cin>>s[i][j];
      |                  ^
a.cc:25:16: error: 's' was not declared in this scope
   25 |             if(s[i][j]=='#'){
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
char s[N][N];
int dir[4][2]={0,1,1,0,0,-1,-1,0};
int a,b; 
 bool search(int x,int y){
     for(int i=0;i<4;i++){
         int xx = x+dir[i][0];
         int yy = y+dir[i][1];
         if(xx>=0&&xx<a&&y>=0&&y<b){
             if(s[xx][yy]=='#')
                 return true;
         }
     }
     return false;
 }
 int main(){
     cin>>a>>b;
     for(int i=0;i<a;i++)
         for(int j=0;j<b;j++)
            cin>>s[i][j];
     for(int i=0;i<a;i++){
         for(int j=0;j<b;j++){
             if(s[i][j]=='#'){
                 bool prime = search(i,j);
                 if(!prime){
                     return 0*printf("No\n");
                 }
             }
         }
     }
printf("Yes\n");
     return 0;
 }

Compiler output:
a.cc:3:8: error: 'N' was not declared in this scope
    3 | char s[N][N];
      |        ^
a.cc:3:11: error: 'N' was not declared in this scope
    3 | char s[N][N];
      |           ^
a.cc: In function 'bool search(int, int)':
a.cc:11:17: error: 's' was not declared in this scope
   11 |              if(s[xx][yy]=='#')
      |                 ^
a.cc: In function 'int main()':
a.cc:21:18: error: 's' was not declared in this scope
   21 |             cin>>s[i][j];
      |                  ^
a.cc:24:17: error: 's' was not declared in this scope
   24 |              if(s[i][j]=='#'){
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{  int n,m,flag=0;
   char a[1009][1009]={'&'};
   cin>>n>>m;
   for(int i=0;i<n;i++)
   {
     for(int j=0;j<m;j++)   cin>>a[i][j]; 
   } 
   for(int i=0;i<n;i++)
   {
     for(int j=0;j<m;j++)   
	 {
	   if(a[i][j]=='#' && a[i-1][j]=='.' && a[i][j-1]=='.'
	   && a[i][j+1]=='.'  && a[i+1][j]=='.') 
	   {
	     flag=1;
	     cout<<"Yes"<<endl;]
	     return 0;
	   }
	 } 
   } 
   if(flag=0)  cout<<"No"<<endl;
   return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:19:32: error: expected primary-expression before ']' token
   19 |              cout<<"Yes"<<endl;]
      |                                ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int h, w;
	cin >> h >> w;
	char s[h][w];
	bool flag = true;
	for(int i = 0; i < h; i++){
		cin >> s[h];
	}
	for (int i = 0; i < h; i++){
		for (int j = 0; j < w; j++){
			for(int k = 0; k < 4; k++){
				if (k == 0 && i != 0 && s[h - 1][w] == '#'){
					flag == true;
					break
				}else if(k == 1 && i != h - 1 && s[h + 1][w] == '#'){
					flag == true;
					break
				}else if(k == 2 && j != 0 && s[h][w - 1] == '#'){
					flag == true;
					break;
				}else if(k == 3 && j != w - 1 && s[h][s + 1] == '#'){
					flag == true;
					break;
				}else{
					flag == false;
				}
			}
		}
	}
	if (flag == true){
		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:46: error: expected ';' before '}' token
   17 |                                         break
      |                                              ^
      |                                              ;
   18 |                                 }else if(k == 1 && i != h - 1 && s[h + 1][w] == '#'){
      |                                 ~             
a.cc:20:46: error: expected ';' before '}' token
   20 |                                         break
      |                                              ^
      |                                              ;
   21 |                                 }else if(k == 2 && j != 0 && s[h][w - 1] == '#'){
      |                                 ~             
a.cc:24:70: error: invalid types 'char [w][char (*)[w]]' for array subscript
   24 |                                 }else if(k == 3 && j != w - 1 && s[h][s + 1] == '#'){
      |                                                                      ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int h, w;
	cin >> h >> w;
	char s[h][w];
	for(int i = 0; i < h; i++){
		cin >> s[h];
	}
	for (int i = 0; i < h; i++){
		for (int j = 0; j < w; j++){
			if (s[i][j] == "."){
				break;
			}else{
				if(s[i + 1][j] == "."){
					if(s[i - 1][j] == "."){
						if(s[i][j + 1] == "."){
							if(s[i][j - 1] == "."){
								cout << "No" << endl;
								return 0;
							}else{
								break;
							}
						}else{
							break;
						}
					}else{
						break;
					}	
				}else{
					break;
				}	
			}
		}
	}
	cout << "Yes" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |                         if (s[i][j] == "."){
      |                             ~~~~~~~~^~~~~~
a.cc:16:48: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |                                 if(s[i + 1][j] == "."){
      |                                    ~~~~~~~~~~~~^~~~~~
a.cc:17:56: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |                                         if(s[i - 1][j] == "."){
      |                                            ~~~~~~~~~~~~^~~~~~
a.cc:18:64: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                                                 if(s[i][j + 1] == "."){
      |                                                    ~~~~~~~~~~~~^~~~~~
a.cc:19:72: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |                                                         if(s[i][j - 1] == "."){
      |                                                            ~~~~~~~~~~~~^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){ 
	int i,j,n,m,f=0;
	cin>>n>>m;
	char s[n+5][m+5];
	for(i=0;i<n;i++){
		for(j=0;j<m;j++){
			cin>>s[i][j];
		}
	}
	for(i=0;i<n;i++){
		for(j=0;j<m;j++){	
			if((s[i][j]=='#')&&(s[i-1][j]=='#'||s[i+1][j]=='#'||s[i][j-1]=='#'||s[i][j+1]=='#')){	
				f=1;
			}	
		}
	} 
	if(f==1){
		cout<<"Yes"<<endl;
	}
	else(f==0){
		cout<<"No"<<endl;
	}	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: expected ';' before '{' token
   22 |         else(f==0){
      |                   ^
      |                   ;
Language: C++

#include<iostream>
using namespace std;

int n,m,f;
char s[51][51];
	
int main(){ 

	cin>>n>>m;
	
		for(int i=1;i<=n;i++){
			for(int j=1;j<=m;j++)
				cin>>s[i][j];
		}
					
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
				if (c[i][j] == '#' && c[i][j - 1] == '#' && c[i - 1][j] == '#' && c[i][j + 1] == '#' && c[i + 1][j] == '#')	
				{
					f=1;break;
				}	
		}	
	}				
	if(f==1)
		cout<<"Yes"<<endl;
	else
		cout<<"No"<<endl;
		
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:37: error: 'c' was not declared in this scope
   18 |                                 if (c[i][j] == '#' && c[i][j - 1] == '#' && c[i - 1][j] == '#' && c[i][j + 1] == '#' && c[i + 1][j] == '#')
      |                                     ^
Language: C++

#include<iostream>
#include <math.h>
using namespace std;

int main(){

   int h,w;
   bool flag=true;
   char array[50][50];

    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            cin>>array[i][j];
        }
    }

    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            if(
                array[i][j]=='#'
             && array[i-1][j]!='#' 
             && array[i][j-1]!='#' 
             && array[i+1][j]!='#'
             && array[i][j-1]!='#'
             ){
                flag=false;
            }
        }
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:32:22: error: expected ';' before 'cout'
   32 |     else(flag==false) cout << "No";
      |                      ^~~~~
      |                      ;
Language: C++

    #include<cstdio>
    #include<iostream>
    #include<cstring>
    #include<algorithm>
    using namespace std;
    typedef long long ll;
    char a[100][100];
    int main()
    {
    	ll h,w;
    	cin>>h>>w;
    	bool sign=false;
    
    	for(int i=1;i<=h;i++)
    		for(int j=1;j<=w;j++)
    			cin>>a[i][j];
    	for(int i=1;i<=h;i++){
    		for(int j=1;j<=w;j++){
    			if(a[i][j]=='#')
    			{
    				sign1=true;
    				if( (a[i+1][j]=='.'||i+1>h) && (a[i][j+1]=='.'||j+1>w)&&(a[i-1][j]=='.'||i-1<0)&&(a[i][j-1]=='.'||j-1<0)){
    					sign=true;
    			
    				}
    			}
    		}
    	}
    
    	if(sign)
    		puts("No");
    	else 
    		puts("Yes");
    		
    	return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:21:33: error: 'sign1' was not declared in this scope; did you mean 'sign'?
   21 |                                 sign1=true;
      |                                 ^~~~~
      |                                 sign
Language: C++

#include <iostream>

using namespace std;

int main(void){
	char map[52][52];

	int h, w;

	for (int i = 0; i < 51; i++){
		for (int j = 0; j < 51; j++){
			map[i][j] = '.';
		}
	}

	cin >> h >> w;
	for (int i = 1; i < h + 1; i++){
		for (int j = 1; j < w + 1; j++){
			cin >> map[i][j];
		}
	}

	int ok = 1;

	for (int i = 1; i < h + 1; i++){
		for (int j = 1; j < w + 1; j++){
			if (map[i][j] == '#'){
				if (map[i-1][j] == '.' && map[i+1][j] == '.' && map[i][j-1] == '.' && map[i][j+1] == '.')
					ok = 0;
		}
	}

	if (ok)
		cout << "Yes" << endl;
	else 
		cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:2: error: expected '}' at end of input
   37 | }
      |  ^
a.cc:5:15: note: to match this '{'
    5 | int main(void){
      |               ^
Language: C++

#include <iostream>

using namespace std;

int main(void){
	char map[52];

	int h, w;

	for (int i = 0; i < 51; i++){
		for (int j = 0; j < 51; j++){
			map[i][j] = '.';
		}
	}

	cin >> h >> w;
	for (int i = 1; i < h + 1; i++){
		for (int j = 1; j < w + 1; j++){
			cin >> map[i][j];
		}
	}

	int ok = 1;

	for (int i = 1; i < h + 1; i++){
		for (int j = 1; j < w + 1; j++){
			if (map[i][j] == '#'){
				if (map[i-1][j] == '.' && map[i+1][j] == '.' && map[i][j-1] == '.' && map[i][j+1] == '.')
					ok = 0;
		}
	}

	if (ok)
		cout << "Yes" << endl;
	else 
		cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: invalid types 'char[int]' for array subscript
   12 |                         map[i][j] = '.';
      |                               ^
a.cc:19:38: error: invalid types 'char[int]' for array subscript
   19 |                         cin >> map[i][j];
      |                                      ^
a.cc:27:35: error: invalid types 'char[int]' for array subscript
   27 |                         if (map[i][j] == '#'){
      |                                   ^
a.cc:28:45: error: invalid types 'char[int]' for array subscript
   28 |                                 if (map[i-1][j] == '.' && map[i+1][j] == '.' && map[i][j-1] == '.' && map[i][j+1] == '.')
      |                                             ^
a.cc:28:67: error: invalid types 'char[int]' for array subscript
   28 |                                 if (map[i-1][j] == '.' && map[i+1][j] == '.' && map[i][j-1] == '.' && map[i][j+1] == '.')
      |                                                                   ^
a.cc:28:87: error: invalid types 'char[int]' for array subscript
   28 |                                 if (map[i-1][j] == '.' && map[i+1][j] == '.' && map[i][j-1] == '.' && map[i][j+1] == '.')
      |                                                                                       ^
a.cc:28:109: error: invalid types 'char[int]' for array subscript
   28 |                                 if (map[i-1][j] == '.' && map[i+1][j] == '.' && map[i][j-1] == '.' && map[i][j+1] == '.')
      |                                                                                                             ^
a.cc:37:2: error: expected '}' at end of input
   37 | }
      |  ^
a.cc:5:15: note: to match this '{'
    5 | int main(void){
      |               ^
Language: C++

#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>
 
using namespace std;
int H,W;
char s[60][60];
int dx[4]={1,-1,0,0};
int dy[4]={0,0,1,-1};
int main(void){
  cin>>H>>W;
  for(int i=0;i<H;i++){
  scanf("%s",&s[i]);}
  bool ans=true;
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      if(s[i][j]=='#'){
        bool found=false;
        for(int k=0;k<4;k++){
          int i2=i+dx[k];
          int j2=j+dy[k];
        if(i2>=0&&i2<H&&j2>=0&&j2<W&&s[i2][j2]=='#'){
          found=true;
          }
         }
        if(!found) ans=false;
        }
      }
    }
cout<<(ans ？ "Yes":"No")<<endl;
  return 0;
}  
        


Compiler output:
a.cc: In function 'int main()':
a.cc:50:11: error: expected ')' before '\U0000ff1f'
   50 | cout<<(ans ？ "Yes":"No")<<endl;
      |       ~   ^~~
      |           )
Language: C++

#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>
 
using namespace std;
int H,W;
char s[60][60];
int dx[4]={1,-1,0,0};
int dy[4]={0,0,1,-1};
int main(void){
  cin>>H>>W;
  for(int i=0;i<H;i++){
  scanf("%s",&s[i]);
  bool ans=true;
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      if(s[i][j]=='#'){
        bool found=false;
        for(int k=0;k<4;k++){
          int i2=i+dx[k];
          int j2=j+dy[k];
        if(i2>=0&&i2<H&&j2>=0&&j2<W&&s[i2][j2]=='#'){
          found=true;
          }
         }
        if(!found) ans=false;
        }
      }
    }
cout<<(ans ？ "Yes":"No")<<endl;
  return 0;
}  
        


Compiler output:
a.cc: In function 'int main()':
a.cc:50:11: error: expected ')' before '\U0000ff1f'
   50 | cout<<(ans ？ "Yes":"No")<<endl;
      |       ~   ^~~
      |           )
a.cc:52:2: error: expected '}' at end of input
   52 | }
      |  ^
a.cc:30:15: note: to match this '{'
   30 | int main(void){
      |               ^
Language: C++

#include "stdafx.h"
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <fstream>
using namespace std;
typedef long long unsigned int ll;

#define rep(i,n)for(i=0;i<n;i++)

#define INF (1e9)
#define PI  (acos(-1))


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

int main()
{
	int  i, j, H, W, dir;
	string s[50];
	cin >> H >> W;
	rep(i, H) {
		cin >> s[i];
	}
	rep(i, H) {
		rep(j, W) {
			if (s[i][j] == '.') continue;
			rep(dir, 4) {
				int ny = i + dy[dir];
				int nx = j + dx[dir];
				if (ny < 0 || nx < 0 ||
					ny >= H || nx >= W) continue;
				if (s[ny][nx] == '#') {
					break;
				}
			}
			if (dir == 4) {
				cout << "No" << endl;
				return 0;
			}
		}
	}

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

}



Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>
 
using namespace std;
int H,W;
char s[60][60];
int dx[4]={1,-1,0,0};
int dy[4]={0,0,1,-1};
int main(void){
  cin>>H>>W;
  for(int i=0;i<H;i++){
  scanf("%s",&s[i])}
  bool ans=true;
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      if(s[i][j]=='#'){
        bool found=false;
        for(int k=0;k<4;k++){
          int i2=i+dx[k];
          int j2=j+dy[k];
        if(i2>=0&&i2<H&&j2>=0&&j2<W&&s[i2][j2]=='#'){
          found=true;
          }
         }
        if(!found) ans=false;
        }
      }
    }
  cout<<(ans？ "Yes":"No")<<endl;
  return 0;
}  
        

Compiler output:
a.cc: In function 'int main()':
a.cc:33:20: error: expected ';' before '}' token
   33 |   scanf("%s",&s[i])}
      |                    ^
      |                    ;
a.cc:50:10: error: 'ans\U0000ff1f' was not declared in this scope
   50 |   cout<<(ans？ "Yes":"No")<<endl;
      |          ^~~~~
a.cc:50:15: error: expected ')' before string constant
   50 |   cout<<(ans？ "Yes":"No")<<endl;
      |         ~     ^~~~~~
      |               )
Language: C++

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

int main(void){
    int Y,X;
    cin>>Y>>X;
    vector<string> s(Y+2);
    s[0] = s[Y+1] = string(X+2,'.');
    rep(y,Y){
        cin>>s[y+1];
        s[y+1] = "#"+s[y+1]+"#";
    }
    rep1(y,Y)rep1(x,X){
        if(s[y][x] == '.')continue;
        int dy[] = {1,-1,0,0};
        int dx[] = {0,0,1,-1};
        bool ng = true;
        rep(i,4){
            if(s[y+dy[i]][x+dx[i]] == '#'){
                ng = false;
            }
        }
        if(ng){
            cout<<"No"<<endl;
            return 0;
        }
    }
    cout<<"Yes"<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: 'y' was not declared in this scope
   14 |     rep1(y,Y)rep1(x,X){
      |          ^
a.cc:14:5: error: 'rep1' was not declared in this scope; did you mean 'rep'?
   14 |     rep1(y,Y)rep1(x,X){
      |     ^~~~
      |     rep
Language: C++

#include <bits/stdc++.h>
#define re return
#define ll long long
#define ld long double
#define f first
#define s second
#define pi acos(-1)
#define oo (int)1e9
#define OO (ll)1e18
#define EPS 1e-7
#define FX(n) fixed<<setprecision(n)
#define mm(o,k) memset(o,k,sizeof o)
#define IO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
const int maxn=55;
int a[maxn][maxn];
int main()
{
    IO;
    int n,m;
    cin >> n >> m;
    for(int i=0;i<n;++i){
        for(int j=0;j<m;++j){
            char x;
            cin >> x;
            a[i][j]=x=='.';
        }
    }
    for(int i=1;i<n-1;++i)
        for(int j=1;j<m-1;++j)
            if(!a[i][j]&&a[i][j+1]&&a[i][j-1]&&a[i+1][j]&&a[i-1][j])exit(puts("No"));
    puts("Yes");
    re 0;
}
\

Compiler output:
a.cc:35:1: error: stray '\' in program
   35 | \
      | ^
Language: C++

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

using namespace std;

int H, W;
vector<vector<char>> s(H, vector<char>(W));
bool flag = true;

int a[4] = { 0, 1, 0, -1 };
int	b[4] = { 1, 0, -1, 0 };

int lake(int A, int B, int C){
	int i;
	if (A < 0 || A >= H || B < 0 || B >= H) {
		return 0;
	}
	else if (C == 0) {
		for (i = 0; i < 4; i++) {
			if (!(lake(A + a[i], B + b[i], C+1))) return flag = false;
		}
	}
	if (s[A][B] =='#') {
		del(A, B);
		for (i = 0; i < 4; i++) {
			lake(A + a[i], B + b[i],C+1);
		}
	}
}

int del(int i, int j) {
	s[i][j] = '.';
}

int main() {
	cin >> H>> W;
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			cin >> s[i][j];
		}
	}
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			if (s[i][j] == '#') lake(i, j, 0);
		}
	}
	if (flag) cout << "Yes" << endl;
	else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int lake(int, int, int)':
a.cc:26:17: error: 'del' was not declared in this scope
   26 |                 del(A, B);
      |                 ^~~
a.cc: In function 'int del(int, int)':
a.cc:35:1: warning: no return statement in function returning non-void [-Wreturn-type]
   35 | }
      | ^
a.cc: In function 'int lake(int, int, int)':
a.cc:31:1: warning: control reaches end of non-void function [-Wreturn-type]
   31 | }
      | ^
Language: C++

int main(){
	cin>>h>>w;
	for(i=0;i<h;i++){
		cin>>s[i];
	}
	for(i=0;i<h;i++){
		for(j=0;j<w;j++){
			//s[i][j]
			if(s[i][j]=='#'){
				bool flag=false;
				for(k=0;k<4;k++){
					if(s[i+dx[k]][j+dy[k]]=='#')flag=true;
				}
				if(!flag){
					dame=true;
					break;
				}
			}
		}
	}
	if(dame){
		p("No");
	}else p("Yes");
	return 0;
				
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:9: error: 'cin' was not declared in this scope
    2 |         cin>>h>>w;
      |         ^~~
a.cc:2:14: error: 'h' was not declared in this scope
    2 |         cin>>h>>w;
      |              ^
a.cc:2:17: error: 'w' was not declared in this scope
    2 |         cin>>h>>w;
      |                 ^
a.cc:3:13: error: 'i' was not declared in this scope
    3 |         for(i=0;i<h;i++){
      |             ^
a.cc:4:22: error: 's' was not declared in this scope
    4 |                 cin>>s[i];
      |                      ^
a.cc:6:13: error: 'i' was not declared in this scope
    6 |         for(i=0;i<h;i++){
      |             ^
a.cc:7:21: error: 'j' was not declared in this scope
    7 |                 for(j=0;j<w;j++){
      |                     ^
a.cc:9:28: error: 's' was not declared in this scope
    9 |                         if(s[i][j]=='#'){
      |                            ^
a.cc:11:37: error: 'k' was not declared in this scope
   11 |                                 for(k=0;k<4;k++){
      |                                     ^
a.cc:12:48: error: 'dx' was not declared in this scope
   12 |                                         if(s[i+dx[k]][j+dy[k]]=='#')flag=true;
      |                                                ^~
a.cc:12:57: error: 'dy' was not declared in this scope
   12 |                                         if(s[i+dx[k]][j+dy[k]]=='#')flag=true;
      |                                                         ^~
a.cc:15:41: error: 'dame' was not declared in this scope
   15 |                                         dame=true;
      |                                         ^~~~
a.cc:21:12: error: 'dame' was not declared in this scope
   21 |         if(dame){
      |            ^~~~
a.cc:22:17: error: 'p' was not declared in this scope
   22 |                 p("No");
      |                 ^
a.cc:23:15: error: 'p' was not declared in this scope
   23 |         }else p("Yes");
      |               ^