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

int main()
{
	string board[50];

	int h = 0;
	int w = 0;

	bool can = true;

	cin >> h >> w;


	//文字列を入力
	for (int i = 0; i < h; i++) {
		cin >> board[i];

	}


	//'#'の文字列を見つけた場合、上下左右の位置に'#'があるかどうか判定し、ある場合はYESを設定

	//上下左右参照用
	int dx[4] = { 1, -1, 0, 0 };
	int dy[4] = { 0, 0, 1, -1 };

	int num = 0;

	bool flag = true;

	for (int i = 0; i < h; i++) {

		if (can == false) break;

		for (int j = 0; j < w; j++) {



			if (board[i][j] == '#') {

				//上下左右を調べ、一つもない場合は目標達成不可
				num = 0;
				for (int k = 0; k < 4; k++) {

					int ni = i + dy[k];
					int nj = j + dx[k];

					if (ni < 0 || ni >= h) continue;
					if (nj < 0 || nj >= w) continue;
					if (board[ni][nj] == '#') num++;


				}
				if (num == 0) {

					can = false;
					break;
				}
				else {

					can = true;
				}

			}


		}

	}

	if (can) cout << "Yes" << endl;
	else cout << "No" << endl;



}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'string' was not declared in this scope
    3 |         string board[50];
      |         ^~~~~~
a.cc:10:9: error: 'cin' was not declared in this scope; did you mean 'can'?
   10 |         cin >> h >> w;
      |         ^~~
      |         can
a.cc:15:24: error: 'board' was not declared in this scope
   15 |                 cin >> board[i];
      |                        ^~~~~
a.cc:38:29: error: 'board' was not declared in this scope
   38 |                         if (board[i][j] == '#') {
      |                             ^~~~~
a.cc:70:18: error: 'cout' was not declared in this scope
   70 |         if (can) cout << "Yes" << endl;
      |                  ^~~~
a.cc:70:35: error: 'endl' was not declared in this scope
   70 |         if (can) cout << "Yes" << endl;
      |                                   ^~~~
a.cc:71:14: error: 'cout' was not declared in this scope
   71 |         else cout << "No" << endl;
      |              ^~~~
a.cc:71:30: error: 'endl' was not declared in this scope
   71 |         else cout << "No" << endl;
      |                              ^~~~
Language: C++


#include <iostream>
#include <string>
#include <math.h>
#include <algorithm>
#include <set>
using namespace std;
void GridRepainting2() {


	string board[50];

	int h = 0;
	int w = 0;

	bool can = true;

	cin >> h >> w;


	//文字列を入力
	for (int i = 0; i < h; i++) {
		cin >> board[i];

	}


	//'#'の文字列を見つけた場合、上下左右の位置に'#'があるかどうか判定し、ある場合はYESを設定

	//上下左右参照用
	int dx[4] = { 1, -1, 0, 0 };
	int dy[4] = { 0, 0, 1, -1 };

	int num = 0;

	bool flag = true;

	for (int i = 0; i < h; i++) {

		if (can == false) break;

		for (int j = 0; j < w; j++) {



			if (board[i][j] == '#') {

				//上下左右を調べ、一つもない場合は目標達成不可
				num = 0;
				for (int k = 0; k < 4; k++) {

					int ni = i + dy[k];
					int nj = j + dx[k];

					if (ni < 0 || ni >= h) continue;
					if (nj < 0 || nj >= w) continue;
					if (board[ni][nj] == '#') num++;


				}
				if (num == 0) {

					can = false;
					break;
				}
				else {

					can = true;
				}

			}


		}

	}

	if (can) cout << "YES" << endl;
	else cout << "NO" << endl;




}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <string>
#include "Header200.h"
#include <math.h>
#include <algorithm>
#include <set>
using namespace std;
void GridRepainting2() {


	string board[50];

	int h = 0;
	int w = 0;

	bool can = true;

	cin >> h >> w;


	//文字列を入力
	for (int i = 0; i < h; i++) {
		cin >> board[i];

	}


	//'#'の文字列を見つけた場合、上下左右の位置に'#'があるかどうか判定し、ある場合はYESを設定

	//上下左右参照用
	int dx[4] = { 1, -1, 0, 0 };
	int dy[4] = { 0, 0, 1, -1 };

	int num = 0;

	bool flag = true;

	for (int i = 0; i < h; i++) {

		if (can == false) break;

		for (int j = 0; j < w; j++) {



			if (board[i][j] == '#') {

				//上下左右を調べ、一つもない場合は目標達成不可
				num = 0;
				for (int k = 0; k < 4; k++) {

					int ni = i + dy[k];
					int nj = j + dx[k];

					if (ni < 0 || ni >= h) continue;
					if (nj < 0 || nj >= w) continue;
					if (board[ni][nj] == '#') num++;


				}
				if (num == 0) {

					can = false;
					break;
				}
				else {

					can = true;
				}

			}


		}

	}

	if (can) cout << "YES" << endl;
	else cout << "NO" << endl;




}

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


#include "pch.h"
#include <iostream>
#include <string>
#include "Header200.h"
#include <math.h>
#include <algorithm>
#include <set>
using namespace std;
void GridRepainting2() {


	string board[50];

	int h = 0;
	int w = 0;

	bool can = true;

	cin >> h >> w;


	//文字列を入力
	for (int i = 0; i < h; i++) {
		cin >> board[i];

	}


	//'#'の文字列を見つけた場合、上下左右の位置に'#'があるかどうか判定し、ある場合はYESを設定

	//上下左右参照用
	int dx[4] = { 1, -1, 0, 0 };
	int dy[4] = { 0, 0, 1, -1 };

	int num = 0;

	bool flag = true;

	for (int i = 0; i < h; i++) {

		if (can == false) break;

		for (int j = 0; j < w; j++) {



			if (board[i][j] == '#') {

				//上下左右を調べ、一つもない場合は目標達成不可
				num = 0;
				for (int k = 0; k < 4; k++) {

					int ni = i + dy[k];
					int nj = j + dx[k];

					if (ni < 0 || ni >= h) continue;
					if (nj < 0 || nj >= w) continue;
					if (board[ni][nj] == '#') num++;


				}
				if (num == 0) {

					can = false;
					break;
				}
				else {

					can = true;
				}

			}


		}

	}

	if (can) cout << "YES" << endl;
	else cout << "NO" << endl;




}

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

string board[50];

	int h = 0;
	int w = 0;

	bool can = true;

	cin >> h >> w;


	//文字列を入力
	for (int i = 0; i < h; i++) {
		cin >> board[i];

	}


	//'#'の文字列を見つけた場合、上下左右の位置に'#'があるかどうか判定し、ある場合はYESを設定

	//上下左右参照用
	int dx[4] = { 1, -1, 0, 0 };
	int dy[4] = { 0, 0, 1, -1 };

	int num = 0;

	bool flag = true;

	for (int i = 0; i < h; i++) {

		if (can == false) break;

		for (int j = 0; j < w; j++) {



			if (board[i][j] == '#') {

				//上下左右を調べ、一つもない場合は目標達成不可
				num = 0;
				for (int k = 0; k < 4; k++) {

					int ni = i + dy[k];
					int nj = j + dx[k];

					if (ni < 0 || ni >= h) continue;
					if (nj < 0 || nj >= w) continue;
					if (board[ni][nj] == '#') num++;


				}
				if (num == 0) {

					can = false;
					break;
				}
				else {

					can = true;
				}

			}


		}

	}

	if (can) cout << "Yes" << endl;
	else cout << "No" << endl;



Compiler output:
a.cc:1:1: error: 'string' does not name a type
    1 | string board[50];
      | ^~~~~~
a.cc:8:9: error: 'cin' does not name a type
    8 |         cin >> h >> w;
      |         ^~~
a.cc:12:9: error: expected unqualified-id before 'for'
   12 |         for (int i = 0; i < h; i++) {
      |         ^~~
a.cc:12:25: error: 'i' does not name a type
   12 |         for (int i = 0; i < h; i++) {
      |                         ^
a.cc:12:32: error: 'i' does not name a type
   12 |         for (int i = 0; i < h; i++) {
      |                                ^
a.cc:28:9: error: expected unqualified-id before 'for'
   28 |         for (int i = 0; i < h; i++) {
      |         ^~~
a.cc:28:25: error: 'i' does not name a type
   28 |         for (int i = 0; i < h; i++) {
      |                         ^
a.cc:28:32: error: 'i' does not name a type
   28 |         for (int i = 0; i < h; i++) {
      |                                ^
a.cc:68:9: error: expected unqualified-id before 'if'
   68 |         if (can) cout << "Yes" << endl;
      |         ^~
a.cc:69:9: error: expected unqualified-id before 'else'
   69 |         else cout << "No" << endl;
      |         ^~~~
Language: Java

import java.util.*;

public class Main{
  public static void main (String[]args){
    Scanner sc = new Scanner(System.in);
    String[] s = sc.nextLine().split(" ");
    int H = Integer.parseInt(s[0]);
    int W = Integer.parseInt(s[1]);
    int[] sx = {-1, 0, +1, 0};
    int[] sy = {0, +1, 0, -1};
    
    char[][] c = new char[H][W];
    for(int i = 0; i < H; i++){
      c[i] = sc.nextLine().toCharArray();
    }
    
    for(int i = 0; i < H; i++){
      for(int j = 0; j < W; j++){
        boolean check = true;
        if(c[i][j] == '#'){
          for(int k = 0; k < 4; k++){
            if(i + k >= 0 && i + k < H; j + k >= 0; j + k < W){
              if(c[i + sx[k]][j + sy[k]] == '#'){
                check = false;
              }
            }
          }
          if(check){
            System.out.println("No");
            System.exit(0);
          }
        }
      }
    }
    System.out.println("Yes");
  }
}

Compiler output:
Main.java:22: error: ')' expected
            if(i + k >= 0 && i + k < H; j + k >= 0; j + k < W){
                                      ^
Main.java:22: error: not a statement
            if(i + k >= 0 && i + k < H; j + k >= 0; j + k < W){
                                              ^
Main.java:22: error: not a statement
            if(i + k >= 0 && i + k < H; j + k >= 0; j + k < W){
                                                          ^
Main.java:22: error: ';' expected
            if(i + k >= 0 && i + k < H; j + k >= 0; j + k < W){
                                                             ^
4 errors
Language: C++

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


int main()
{
    int h,w;
    cin>>h>>w;
    vector<string> line(h);
    for(i=0;i<h;++i){
        cin >> line.at(i);
    }
    
    const int dx[4] = [0,1,0,-1];
    const int dy[4] = [1,0,-1,0];
    bool can = 1;

    for(int i=0;i<h;++i){
        if (!can) break;

        for(int j=0;j<w;++j){
            if (line.at(i).at(j)=='.') continue;
            bool flag = 0;
            for(int k=0;k>4;++k){
                const int x = i + dx[k];
                const int y = j + dy[k];
                if (x<0||x>=h) continue;
                if (y<0||y>=w) continue;

                if (line.at(x).at(y) == '#' ) flag = 1;
            }
            if (!flag){
                can = 0;
                break;
            }
        }
    }
    if (can) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'i' was not declared in this scope
   10 |     for(i=0;i<h;++i){
      |         ^
a.cc:14:24: error: expected identifier before numeric constant
   14 |     const int dx[4] = [0,1,0,-1];
      |                        ^
a.cc:14:25: error: expected ']' before ',' token
   14 |     const int dx[4] = [0,1,0,-1];
      |                         ^
      |                         ]
a.cc: In lambda function:
a.cc:14:25: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:14:23: error: array must be initialized with a brace-enclosed initializer
   14 |     const int dx[4] = [0,1,0,-1];
      |                       ^~
a.cc:14:26: error: expected unqualified-id before numeric constant
   14 |     const int dx[4] = [0,1,0,-1];
      |                          ^
a.cc:15:24: error: expected identifier before numeric constant
   15 |     const int dy[4] = [1,0,-1,0];
      |                        ^
a.cc:15:25: error: expected ']' before ',' token
   15 |     const int dy[4] = [1,0,-1,0];
      |                         ^
      |                         ]
a.cc: In lambda function:
a.cc:15:25: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:15:23: error: array must be initialized with a brace-enclosed initializer
   15 |     const int dy[4] = [1,0,-1,0];
      |                       ^~
a.cc:15:26: error: expected unqualified-id before numeric constant
   15 |     const int dy[4] = [1,0,-1,0];
      |                          ^
Language: C++

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

int h,w
  int a=0;
  cin >>h>>w
vector<vector<int>> data(h,vector<int>(w);
  
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      cin >> data.at(i).at(j)
    }
  }
 
  bool real=false ;                      
 for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(data.at(i).at(j) == '#'){
        
       if(data.at(i+1).at(j+1) == '.' && data.at(i+1).at(j-1) == '.' && data.at(i-1).at(j+1) == '.' && data.at(i-1).at(j-1) == '.' ){
          real=true;
         a=10;
            break;}
      }
    }
   if(real){
     break;}
 }
   
    if(a==10){
      cout<<"No"<<endl;}
     else{
       cout<<"Yes"<<endl;}
          
                         }

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:5:1: error: expected primary-expression before 'int'
    5 | int h,w
      | ^~~
a.cc:5:1: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:7:3: error: 'cin' does not name a type
    7 |   cin >>h>>w
      |   ^~~
a.cc:10:3: error: expected unqualified-id before 'for'
   10 |   for(int i=0;i<h;i++){
      |   ^~~
a.cc:10:15: error: 'i' does not name a type
   10 |   for(int i=0;i<h;i++){
      |               ^
a.cc:10:19: error: 'i' does not name a type
   10 |   for(int i=0;i<h;i++){
      |                   ^
a.cc:17:2: error: expected unqualified-id before 'for'
   17 |  for(int i=0;i<h;i++){
      |  ^~~
a.cc:17:14: error: 'i' does not name a type
   17 |  for(int i=0;i<h;i++){
      |              ^
a.cc:17:18: error: 'i' does not name a type
   17 |  for(int i=0;i<h;i++){
      |                  ^
a.cc:31:5: error: expected unqualified-id before 'if'
   31 |     if(a==10){
      |     ^~
a.cc:33:6: error: expected unqualified-id before 'else'
   33 |      else{
      |      ^~~~
a.cc:36:26: error: expected declaration before '}' token
   36 |                          }
      |                          ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main(){
	int h, w;
	cin >> h >> w;
	char s[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] == '.')continue;
			if(i && s[i-1][j]=='#')continue;
			if(i != h-1 && s[i+1][j]=='#')continue;
			if(j && s[i][j-1]=='#')continue;
			if(j != w-1 && s[i][j+1]=='#')continue;
			cout << "No" << endl;
			return;
		}
	}
	cout << "Yes" << endl;		
    return 0;
}

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

#include <iostream>
using namesace std;

char C[64][64], int H, W, count=0

int main(void) {

	cin >> H >> W;
	for (int i = 1; i <= H; i++) {
		for (int i = 1; i <= W; i++) {
			>> C[i][j];
		}
		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 + 1][j] == '#' && C[i][j + 1] == '#') {
					count++;
					break;
				}
			}
		}
	}
	if (count == 0) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesace'
    2 | using namesace std;
      |       ^~~~~~~~
a.cc:4:17: error: expected unqualified-id before 'int'
    4 | char C[64][64], int H, W, count=0
      |                 ^~~
Language: C++

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

int H, W;
char c[55][55];
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};

int main() {
	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:13:22: error: 's' was not declared in this scope
   13 |         scanf("%s", &s[i]);
      |                      ^
a.cc:18:17: error: 's' was not declared in this scope
   18 |             if (s[i][j] = '#') {
      |                 ^
Language: C++

#include <cstdio>
using namespace std;

int H, W;
char c[55][55];
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};

int main() {
	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:10:9: error: 'cin' was not declared in this scope
   10 |         cin >> H >> W;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:12:22: error: 's' was not declared in this scope
   12 |         scanf("%s", &s[i]);
      |                      ^
a.cc:17:17: error: 's' was not declared in this scope
   17 |             if (s[i][j] = '#') {
      |                 ^
a.cc:31:5: error: 'cout' was not declared in this scope
   31 |     cout << (ans ? "Yes" : "No") << endl;
      |     ^~~~
a.cc:31:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:31:37: error: 'endl' was not declared in this scope
   31 |     cout << (ans ? "Yes" : "No") << endl;
      |                                     ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <cstdio>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

using namespace std;

using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
#include <iostream>
#include <string>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cmath>
#include <climits>
#define all(x) (x).begin(),(x).end()

void solve(){

}
int main(){
    int h,w;

    cin >> h >> w;
    string s[55];
    for (int i = 0; i < h; i++){
        cin >> s[i];
    }

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

    bool can = true;
    for (int i = 0; i < h; i++){
        for (int k = 0; k < w; k++){
            if (s[i][k] != '#'){
                continue;
            }
            int cnt = 0;
            for (int p = 0; p < 4; p++){
                const int x = k + dx[p];
                const int y = i + dy[p];
                if (x >= 0 && x < w && y >= 0 && y < h){
                    if (s[y][x] == '#'){
                        cnt++
                    }
                }
            }
            if (cnt == 0){
                can = false;
            }
        }
    }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:42:30: error: expected ';' before '}' token
   42 |                         cnt++
      |                              ^
      |                              ;
   43 |                     }
      |                     ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
	int H, W;
	cin >> H >> W;
	char A[H][W];
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			cin >> A[i][j];
		}
	}
	int x[4] = { 1,0,-1,0 };
	int y[4] = { 0,1,0,-1 };
	bool flg = true;
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			//A kakutei
			int cnt=0;
			for (int s = 0; s < 4; s++) {
				for (int t = 0; t < 4; t++) {
					if ((j + x[s]) < 0 || (j + x[s]) >= W) {
						continue;
					}
					else if ((i + y[t]) < 0 || (i + y[t]) >= H) {
						continue;
					}
					else {
						if (A[i + x[s][j + y[t] == '.') {
							cnt++;
					 }
					}
				}
			}
			if (cnt == 4) {
				flg = false;
			}
		}
	}
	if (flg) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:79: error: expected ']' before ')' token
   28 |                                                 if (A[i + x[s][j + y[t] == '.') {
      |                                                                               ^
      |                                                                               ]
a.cc:28:63: error: invalid types 'int[bool]' for array subscript
   28 |                                                 if (A[i + x[s][j + y[t] == '.') {
      |                                                               ^
a.cc:28:79: error: expected ']' before ')' token
   28 |                                                 if (A[i + x[s][j + y[t] == '.') {
      |                                                                               ^
      |                                                                               ]
Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<vector>
#include<numeric>
using namespace std;
int main(){
  int h, w; cin >> h >> w;
  string s[51][51];

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

  bool ans = false;
  string im = "Yes";

  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){
      if(s[i][j] == "#"){
        if(i == 0 || j == 0){
          if(s[i][j+1] != "#" && s[i+1][j] != "#") ima = "No";
        }
        
        else if(s[i-1][j] != "#" && s[i+1][j] != "#" && s[i][j + 1] != "#" && s[i][j-1] != "#"){
          im = "No";
        }
      }

      else continue;
    }
  }

  cout << im << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:52: error: 'ima' was not declared in this scope; did you mean 'im'?
   24 |           if(s[i][j+1] != "#" && s[i+1][j] != "#") ima = "No";
      |                                                    ^~~
      |                                                    im
Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<vector>
#include<numeric>
using namespace std;
int main(){
  int h, w; cin >> h >> w;
  string s[51][51];

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

  bool ans = false;
  string ima = "Yes"

  for(int i = 0; i < h; i++){
    for(int j = 0; j < w; j++){

      if(s[i][j] == "#"){
        if(s[i-1][j] == "#" || s[i+1][j] == "#" || s[i][j + 1] == "#" || s[i][j-1] == "#"){
          continue;
        }
        else {
          ima = "No"
        }
      }

      else continue;
    }
  }

  cout << ima << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: expected ',' or ';' before 'for'
   20 |   for(int i = 0; i < h; i++){
      |   ^~~
a.cc:20:18: error: 'i' was not declared in this scope
   20 |   for(int i = 0; i < h; i++){
      |                  ^
Language: C++

h,w = map(int,input().split())
ss = []
for i in range(h):
    ss.append(list(input()))

def search(i,j):
    c = 0

    if i != 0:
        if ss[i-1][j] == "#":
            c += 1
    if i != h-1:
        if ss[i+1][j] == "#":
            c += 1
    if j != 0:
        if ss[i][j-1] == "#":
            c += 1
    if j != w-1:
        if ss[i][j+1] == "#":
            c += 1

    if c > 0:
        return False
    else:
        return True
    

ans = "Yes" 
for i in range(h):
    for j in range(w):
        if ss[i][j] == "#":
            if search(i,j):
                ans = "No"
                break

print(ans)

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

#include<stdio.h>
#include<stdlib.h>
#include<math.h>

/*
要素50*50こ2500
全部探索N^2アルゴリズムで間に合う
      i-1,j
  i,j-1 i,j i,j+1
      i+1,j
*/

int checker(int size1,int size2,char s[size1][size2]){
    int i,j;
    for(i=0;i<size1;i++){
        for(j=0;j<size2-1;j++){
            if(s[i][j] == '#'){
                if(i-1>=0){
                    if(s[i-1][j] == '#'){
                        continue;
                    }
                }
                if(i+1<size1){
                    if(s[i+1][j] == '#'){
                        continue;
                    }
                }
                if(j-1>=0){
                    if(s[i][j-1] == '#'){
                        continue;
                    }
                }
                if(j+1<size2-2){
                    if(s[i][j+1] == '#'){
                        continue;
                    }
                }
                return 0;
            }
        }
    }
    return 1;
}

int main(void){
    int i,h,w;
    scanf("%d %d",&h,&w);
    char s[h][w+1];
    for(i=0;i<h;i++){
        scanf("%s",s[i]);
    }
    if(checker(h,w+1,s) == 0){
        printf("No\n");
    }
    else{
        printf("Yes\n");
    }

    return 0;
}

Compiler output:
a.cc:13:45: error: use of parameter outside function body before ']' token
   13 | int checker(int size1,int size2,char s[size1][size2]){
      |                                             ^
a.cc:13:52: error: use of parameter outside function body before ']' token
   13 | int checker(int size1,int size2,char s[size1][size2]){
      |                                                    ^
a.cc: In function 'int checker(...)':
a.cc:15:15: error: 'size1' was not declared in this scope; did you mean 'size_t'?
   15 |     for(i=0;i<size1;i++){
      |               ^~~~~
      |               size_t
a.cc:16:19: error: 'size2' was not declared in this scope; did you mean 'size_t'?
   16 |         for(j=0;j<size2-1;j++){
      |                   ^~~~~
      |                   size_t
a.cc:17:16: error: 's' was not declared in this scope
   17 |             if(s[i][j] == '#'){
      |                ^
Language: C++

#include <iostream>
#include <vector>
#include "../cxx-prettyprint/prettyprint.hpp"
using std::vector;

int main() {
    int H, W;
    std::cin >> H >> W;

    vector<vector<char>> s(H, vector<char>(W));
    vector<vector<bool>> black_bits(H, vector<bool>(W, false));
    for (int i = 0; i < H; i ++) {
        for (int j = 0; j < W; j++) {
            std::cin >> s[i][j];
            if (s[i][j] == '#') black_bits[i][j] = true;
        }
    }

    for (int i = 0; i < H; i ++) {
        for (int j = 0; j < W; j ++) {
            if (!black_bits[i][j]) continue;

            bool cond_up    = i > 0     && black_bits[i - 1][j];
            bool cond_down  = i < H - 1 && black_bits[i + 1][j];
            bool cond_left  = j > 0     && black_bits[i][j - 1];
            bool cond_right = j < W - 1 && black_bits[i][j + 1];

            if (!(cond_up || cond_down || cond_left || cond_right)) {
                std::cout << "No" << std::endl;
                return 0;
            }
        }
    }
    std::cout << "Yes" << std::endl;
}


Compiler output:
a.cc:3:10: fatal error: ../cxx-prettyprint/prettyprint.hpp: No such file or directory
    3 | #include "../cxx-prettyprint/prettyprint.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:26:27: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   26 |   cout << flag?"Yes":"No" << endl;
      |                      ~~~~~^~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:127: error: expected ')' before '{' token
   14 |             if(c[i][j]=='#'&&!(c[min(a-1,i+1)][j]=='#'||c[max(0,i-1)][j]=='#'||c[i][min(b-1,j+1)]=='#'||c[i][max(0,j-1)]=='#'){
      |               ~                                                                                                               ^
      |                                                                                                                               )
a.cc:18:9: error: expected primary-expression before '}' token
   18 |         }
      |         ^
Language: C++

#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <utility>
#include <functional>
#include <iomanip>
#include <typeinfo>
#include <iterator>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <tuple>
#include <map>
#include <set>
using namespace std;


typedef long long       ll;
struct edge { ll to; ll cost; };
typedef vector<int>     vi;
typedef vector<ll>      vll;
typedef vector<double>  vd;
typedef vector<bool>    vb;
typedef vector<string>  vs;
typedef vector<char>    vc;
typedef vector<edge>    ve;
typedef pair<int, int>  pii;
typedef pair<ll, ll>    pll;
typedef vector<pii>     vpii;
typedef vector<pll>     vpll;
typedef vector<ve>      vve;
typedef vector<vc>		vvc;

// マクロ
#define repr(itr, bgn, end) for (ll itr = (ll)bgn; itr < (ll)end; ++itr)
#define rep(itr, end) repr(itr, 0, end)
#define reprrev(itr, bgn, end) for (ll itr = (ll)end - 1; itr >= (ll)bgn; --i)
#define reprev(itr, end) reprrev(itr, 0, end)
#define all(container) container.begin(), container.end()
#define sortall(container) sort(all(container))
#define yn(cond) cond ? (cout << "Yes" << endl) : (cout << "No" << endl)
#define YN(cond) cond ? (cout << "YES" << endl) : (cout << "NO" << endl)

// 定数
#define LLONG_MAX 9223372036854775807
constexpr double PI = 3.14159265358979323846;
constexpr ll INF = 1 << 15;
constexpr ll MOD = (ll)1e9 + 7;
constexpr double EPS = 1e-7;

// よく使うもの
constexpr int dy[4] = { 0, 1, 0, -1 };
constexpr int dx[4] = { 1, 0, -1, 0 };


// vector入力
template<typename T>
istream& operator >> (istream& is, vector<T>& vec) {
	for (T& x : vec) is >> x;
	return is;
}

// vector出力
template<typename T>
ostream& operator << (ostream& os, vector<T>& vec) {
	for (T& x : vec) os << x << " ";
	return os;
}

// ***<ここから>****************************************************************

int main(void) {

	int H, W;
	cin >> H >> W;
	vvc s(H, vc(W));

	rep(i, H, ) {
		rep(j, W) {
			cin >> s[i][j];
		}
	}

	rep(i, H) {
		rep(j, W) {
			if (s[i][j] == '#') {
				bool ok = false;
				rep(k, 4) {
					if (j + dx[k] < 0 || j + dx[k] >= H || i + dy[k] < 0 || i + dy[k] >= W) continue;
					if (s[i + dy[k]][j + dx[k]] == '#') ok = true;
				}
				if (!ok) {
					cout << "No" << endl;
					return 0;
				}
			}
		}
	}

	cout << "Yes" << endl;

	return 0;
}


Compiler output:
a.cc:80:19: error: macro "rep" passed 3 arguments, but takes just 2
   80 |         rep(i, H, ) {
      |                   ^
a.cc:38:9: note: macro "rep" defined here
   38 | #define rep(itr, end) repr(itr, 0, end)
      |         ^~~
a.cc: In function 'int main()':
a.cc:80:9: error: 'rep' was not declared in this scope
   80 |         rep(i, H, ) {
      |         ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: expected primary-expression before 'if'
   12 |             if(if(ch[i][j]=='#'&&ch[i][j-1]=='.'&&ch[i][j+1]=='.'&&ch[i+1][j]=='.'&&ch[i-1][j]=='.'){
      |                ^~
a.cc:12:16: error: expected ')' before 'if'
   12 |             if(if(ch[i][j]=='#'&&ch[i][j-1]=='.'&&ch[i][j+1]=='.'&&ch[i+1][j]=='.'&&ch[i-1][j]=='.'){
      |               ~^~
      |                )
a.cc:16:9: error: expected primary-expression before '}' token
   16 |         }
      |         ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int h,w;
	cin>>h>>w;
	
	char a[h+2][w+2];
	
	for(int i=0;i<=h+1;i++)
	{
		for(int j=0;j<=w+1;j++)
		{
			a[i][j]='.';
		}
	}
	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]=='#' && a[i-1][j]!='#' && a[i+1][j]!='#' &&\
			 a[i][j-1]!='#' && a[i][j+1]!='#')
			 {
			 cout<<"No";
			 return 0;
		}
		}
		
		
		cout<<"Yes";
		return 0;
	}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   19 |                 a[i][j]=".";
      |                         ^~~
      |                         |
      |                         const char*
a.cc:21:34: error: 'j' was not declared in this scope
   21 |                         if (a[i][j]=="#"&&a[i+1][j]!="#"&&a[i-1][j]!="#"&&a[i][j-1]!="#"&&a[i][j+1]!="#")
      |                                  ^
Language: C

#include<stdio>
int main(void){
    int h,w;
    int count;
    char box[55][55];
    int h1=scanf("%d",&h);
    int w1=scanf("%d",&w);
    for(int i=1;i<=h;i++){
        for(int j=1;j<=w;j++){
           char box1= scanf("%s",&box[i][j]);  
        //    printf("%d",box[i][j]);
        }
       // printf("\n");

    } for(int i=1;i<=h;i++){
        for(int j=1;j<=w;j++){
            if(box[i][j]=='#'&&box[i+1][j]!='#'&&box[i-1][j]!='#'&&box[i][j+1]!='#'&&box[i][j-1]!='#'){
                count++;
            }
        }
    }        
            if(count==0){
                printf("Yes");
            }else{
                printf("No");
            }
        
     
     return 0;
}

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

#include <iostream>
using namespace std;

int main(){
	int H,W;
	cin >> H;
	cin >> W;
	char grid[55][55];
	int cnt,i,j;
	cnt = 0;
	for( i=1; i <= H; ++i){
		for( j=1; j <= W; ++j){
			cin >> grid[i][j];
		}
	}
	for( i=1; i <= H; ++i){
		for( j=1; j <= W; ++j){
			if(c[i][j]=='#' 
			&& c[i-1][j] != '#'
			&& c[i][j-1] != '#'
			&& c[i+1][j] != '#'
			&& c[i][j+1] != '#'
			) ++cnt;
		}
	}
	if (cnt > 0){
		cout << "No" << endl;
	}else{
		cout << "Yes" << endl;
	}

	return 0;
}


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

#include <iostream>
using namespace std;

int main(){
	int H,W;
	cin >> H;
	cin >> W;
	char grid[55][55];
	int cnt,i,j;
	cnt = 0;
	for( i=1; i <= H; ++i){
		for( j=1; j <= W; ++j){
			cin >> grid[i][j];
		}
	}
	for( i=1; i <= H; ++i){
		for( j=1; j <= W; ++j){
			if(c[i][j]=='#' 
			&& c[i-1][j] != '#'
			&& c[i][j-1] != '#'
			&& c[i+1][j] != '#'
			&& c[i][j+1] != '#'
			) ++cnt;
		}
	}
	if (cnt > 0){
		cout << "No" << endl
	}else{
		cout << "Yes" << endl
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:28: error: 'c' was not declared in this scope
   18 |                         if(c[i][j]=='#'
      |                            ^
a.cc:27:37: error: expected ';' before '}' token
   27 |                 cout << "No" << endl
      |                                     ^
      |                                     ;
   28 |         }else{
      |         ~                            
a.cc:29:38: error: expected ';' before '}' token
   29 |                 cout << "Yes" << endl
      |                                      ^
      |                                      ;
   30 |         }
      |         ~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int H,W;
	cin >> H;
	cin >> W;
	char grid[55][55];
	int cnt,i,j;
	cnt = 0;
	for( i=1; i <= H; ++i){
		for( j=1; j <= W; ++j){
			cin >> grid[i][j];
		}
	}
	for( i=1; i <= H; ++i){
		for( j=1; j <= W; ++j){
			if(c[i][j]=='#' 
			&& c[i-1][j] != '#'
			&& c[i][j-1] != '#'
			&& c[i+1][j] != '#'
			&& c[i][j+1] != '#'
			) ++cnt;
		}
	}
	if (cnt > 0){
		cout << "no" << endl
	}else{
		cout << "yes" << endl
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:28: error: 'c' was not declared in this scope
   18 |                         if(c[i][j]=='#'
      |                            ^
a.cc:27:37: error: expected ';' before '}' token
   27 |                 cout << "no" << endl
      |                                     ^
      |                                     ;
   28 |         }else{
      |         ~                            
a.cc:29:38: error: expected ';' before '}' token
   29 |                 cout << "yes" << endl
      |                                      ^
      |                                      ;
   30 |         }
      |         ~
Language: C++

#include <iostream>

int main(){
	cin >> H;
	cin >> W;
	char grid[55][55];
	int cnt,i,j;
	cnt = 0;
	for( i=1; i <= H; ++i){
		for( j=1; j <= W; ++j){
			cin >> grid[i][j];
		}
	}
	for( i=1; i <= H; ++i){
		for( j=1; j <= W; ++j){
			if(c[i][j]=='#' 
			&& c[i-1][j] != '#'
			&& c[i][j-1] != '#'
			&& c[i+1][j] != '#'
			&& c[i][j+1] != '#'
			) ++cnt;
		}
	}
	if (cnt > 0){
		cout << "no" << endl
	}else{
		cout << "yes" << endl
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |         cin >> H;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:16: error: 'H' was not declared in this scope
    4 |         cin >> H;
      |                ^
a.cc:5:16: error: 'W' was not declared in this scope
    5 |         cin >> W;
      |                ^
a.cc:16:28: error: 'c' was not declared in this scope
   16 |                         if(c[i][j]=='#'
      |                            ^
a.cc:25:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |                 cout << "no" << endl
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:25:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |                 cout << "no" << endl
      |                                 ^~~~
      |                                 std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:27:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   27 |                 cout << "yes" << endl
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:27:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   27 |                 cout << "yes" << endl
      |                                  ^~~~
      |                                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++


#include <iostream>
#include <algorithm>
#include <vector>
#include <string.h>
using namespace std;

int main() {
    
    int H, W;
    
    cin >> H >> W;
    
    string matrix[H];
    
    for(int i = 0; i < H; i++) {
        cin >> matrix[i];
    }
    
    
    
    for(int i = 0; i < H; i++) {
        string::size_type index = -1;
        while(true) {
            index = matrix[i].find("#", index+1);
            if(index == string::npos) {
                break;
            }
            bitset<4> bitset = {0};
            if(index > 0) {
                if(matrix[i][index-1] == '.') {
                    bitset.set(0);
                }
            } else {
                bitset.set(0);
            }
            if(index < W - 1) {
                if(matrix[i][index+1] == '.') {
                    bitset.set(1);
                }
            } else {
                bitset.set(1);
            }
            if(i > 0) {
                if(matrix[i-1][index] == '.') {
                    bitset.set(2);
                }
            } else {
                bitset.set(2);
            }
            if(i < H - 1) {
                if(matrix[i+1][index] == '.') {
                    bitset.set(3);
                }
            } else {
                bitset.set(3);
            }
            
            if(bitset.all()) {
                cout << "No\n";
                return 0;
            }
        }
    }
    cout << "Yes\n";
    
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:13: error: 'bitset' was not declared in this scope
   29 |             bitset<4> bitset = {0};
      |             ^~~~~~
a.cc:6:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
    5 | #include <string.h>
  +++ |+#include <bitset>
    6 | using namespace std;
Language: C++

#include<stdio.h>
int main(){
int H,W,i,j;
char A[52][52]={.};
scanf("%d%d",&H,&W);
for(i=1;i<=H;i++){
for(j=1;j<=W;j++){
scanf("%c",&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]=='.'){printf("No");
return 0;}}
}}
printf("Yes");
return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: expected primary-expression before '.' token
    4 | char A[52][52]={.};
      |                 ^
a.cc:4:18: error: expected unqualified-id before '}' token
    4 | char A[52][52]={.};
      |                  ^
Language: C++

#include<stdio.h>
int main(){
int H,W,i,j;
char A[52][52]={''."};
scanf("%d%d",&H,&W);
for(i=1;i<=H;i++){
for(j=1;j<=W;j++){
scanf("%c",&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]=='.'){printf("No");
return 0;}}
}}
printf("Yes");
return 0;
} 

Compiler output:
a.cc:4:17: error: empty character constant
    4 | char A[52][52]={''."};
      |                 ^~
a.cc:4:20: warning: missing terminating " character
    4 | char A[52][52]={''."};
      |                    ^
a.cc:4:20: error: missing terminating " character
    4 | char A[52][52]={''."};
      |                    ^~~
a.cc: In function 'int main()':
a.cc:5:1: error: request for member 'scanf' in ''\000'', which is of non-class type 'char'
    5 | scanf("%d%d",&H,&W);
      | ^~~~~
a.cc:5:20: error: expected '}' before ';' token
    5 | scanf("%d%d",&H,&W);
      |                    ^
a.cc:4:16: note: to match this '{'
    4 | char A[52][52]={''."};
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
char c[55][55]; int h, w, cnt;
int main() 
{
	cin >> h >> w;
	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) 
			cin >> c[i][j];
	}
	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) {
			if (c[i][j] == '#' && c[i][j - 1] != '#' && c[i - 1][j] != '#' && c[i][j + 1] != '#' && c[i + 1][j] != '#') 
				cnt++;
		}
	}
	if (cnt == 0) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: 'H' was not declared in this scope
    7 |         for (int i = 1; i <= H; i++) {
      |                              ^
a.cc:8:38: error: 'W' was not declared in this scope
    8 |                 for (int j = 1; j <= W; j++)
      |                                      ^
a.cc:11:30: error: 'H' was not declared in this scope
   11 |         for (int i = 1; i <= H; i++) {
      |                              ^
a.cc:12:38: error: 'W' was not declared in this scope
   12 |                 for (int j = 1; j <= W; j++) {
      |                                      ^
Language: C++

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

using namespace std;

int main(){
  int h, w;

  cin >> h >> w;

  vector<string> data;
  string s;
  for (int i = 0; i < h; i++){
    cin >> s;
    data.push_back(s);
  }
  /*
  for (int i; i < h; i++){
    cout << data[i] << endl;
  }
  */

  /*
  cout << data[1][1] << endl;
  cout << data[-1][0] << endl;
  cout << data[h][w] << endl;
    cout << data[0][-1] << endl;

  */

  bool ispossible = true;
  //bool inc = false;
  for (int i = 0; i < h; i++){
    for (int j = 0; j < w; j ++){
      if (data[i][j] == '#'){
        //inc = true;
        if (i == 0 && j == 0){
          ispossible = ((data[i][j+1] == '#') || (data[i+1][j] == '#'));
        }else if (i == 0 && j == w-1){
          ispossible = ((data[i][j-1] == '#') || (data[i+1][j] == '#'));
        }else if (i == h-1 && j == w-1){
          ispossible = ((data[i][j-1] == '#') || (data[i-1][j] == '#'));
        }else if (i == h-1 && j == 0){
          ispossible = ((data[i][j+1] == '#') || (data[i-1][j] == '#'));
        }else if (i == 0){
          ispossible = ((data[i+1][j] == '#') || (data[i][j+1] == '#') || (data[i][j-1] == '#'));
        }else if (i == h-1){
          ispossible = ((data[i-1][j] == '#') || (data[i][j+1] == '#') || (data[i][j-1] == '#'));
        }else if (j == 0){
          ispossible = ((data[i-1][j] == '#') || (data[i][j+1] == '#') || (data[i+1][j] == '#'));
        }else if (j == w-1){
          ispossible = ((data[i-1][j] == '#') || (data[i][j-1] == '#') || (data[i+1][j] == '#'));
        }else{
          ispossible = ((data[i-1][j] == '#') || (data[i][j+1] == '#') || (data[i][j-1] == '#') || (data[i+1][j] == '#'));
        }
      }
      if (!ispossible) break;
    }
    if (!ispossible) break;
  }

  if (ispossible{
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:64:17: error: expected ';' before '{' token
   64 |   if (ispossible{
      |                 ^
      |                 ;
a.cc:66:4: error: expected primary-expression before 'else'
   66 |   }else{
      |    ^~~~
a.cc:66:4: error: expected ')' before 'else'
   66 |   }else{
      |    ^~~~
      |    )
a.cc:64:6: note: to match this '('
   64 |   if (ispossible{
      |      ^