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

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <queue>
#include <cmath>

using namespace std;
using ll = long long;
using ull = unsigned long long;


void ABC096C()
{
	int H, W;
	cin >> H >> W;
	vector<vector<int> > grid(H, vector<int>(W));
	for (int i = 0; i < H; ++i)
	{
		string str;
		cin >> str;
		for (int j = 0; j < W; ++j)
		{
			if (str[j] == '.')
				grid[i][j] = 0;
			else
				grid[i][j] = 1;
		}
	}
	vector<pair<int, int> > dx = { {0,1},{0,-1}, {1,0}, {-1,0} };
	for (int i = 0; i < H; ++i)
	{
		for (int j = 0; j < W; ++j)
		{
			if (grid[i][j] > 0)
			{
				bool found = false;
				for (int k = 0; k < 4; ++k)
				{
					int x = i + dx[k].first;
					int y = j + dx[k].second;
					if (x > -1 && x < H && y > -1 && y < W && grid[x][y] > 0)
					{
						found = true;
						break;
					}
				}
				if (!found)
				{
					cout << "No" << endl;
					return;
				}
			}
		}
		cout << "No" << endl;
		return;
	}
}#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <queue>
#include <cmath>

using namespace std;
using ll = long long;
using ull = unsigned long long;


void ABC096C()
{
	int H, W;
	cin >> H >> W;
	vector<vector<int> > grid(H, vector<int>(W));
	for (int i = 0; i < H; ++i)
	{
		string str;
		cin >> str;
		for (int j = 0; j < W; ++j)
		{
			if (str[j] == '.')
				grid[i][j] = 0;
			else
				grid[i][j] = 1;
		}
	}
	vector<pair<int, int> > dx = { {0,1},{0,-1}, {1,0}, {-1,0} };
	for (int i = 0; i < H; ++i)
	{
		for (int j = 0; j < W; ++j)
		{
			if (grid[i][j] > 0)
			{
				bool found = false;
				for (int k = 0; k < 4; ++k)
				{
					int x = i + dx[k].first;
					int y = j + dx[k].second;
					if (x > -1 && x < H && y > -1 && y < W && grid[x][y] > 0)
					{
						found = true;
						break;
					}
				}
				if (!found)
				{
					cout << "No" << endl;
					return;
				}
			}
		}
		cout << "No" << endl;
		return;
	}
}
int main()
{
	ABC096C();
	return 0;
}

Compiler output:
a.cc:63:2: error: stray '#' in program
   63 | }#include <iostream>
      |  ^
a.cc:63:3: error: 'include' does not name a type
   63 | }#include <iostream>
      |   ^~~~~~~
a.cc:80:6: error: redefinition of 'void ABC096C()'
   80 | void ABC096C()
      |      ^~~~~~~
a.cc:18:6: note: 'void ABC096C()' previously defined here
   18 | void ABC096C()
      |      ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
  int H, W;
  cin >> H >> W;
  bool flag;
  
  vector<string> board(H);
  rep(i, H) cin >> board[i];
  int di[2] = {-1, 0, 0, 1};
  int dj[2] = {0, -1, 1, 0};
  
  rep(i, H){
  	rep(j, W){
    	if(board[i][j] == '.') continue;
      	flag = false;
      	
      	for(int d=0; d<4; d++){
        	int ni = i + di[d];
          	int nj = j + dj[d];
          
          	if(ni < 0 || H <= ni) continue;
          	if(nj < 0 || W <= nj) continue;
          	if(board[i][j] = '#'){
            	flag = true;
              	break;
            }
        }
      	
      	if(flag == false) break;
    }
    if(flag == false) break;
  }
  
  if(flag) cout << "Yes" << endl;
  else cout << "No" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: too many initializers for 'int [2]'
   11 |   int di[2] = {-1, 0, 0, 1};
      |                           ^
a.cc:12:27: error: too many initializers for 'int [2]'
   12 |   int dj[2] = {0, -1, 1, 0};
      |                           ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define irep(i, a, n) for (int i = a; i < (int)(n); ++i)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define rrep1(i, n) for (int i = (int)(n); i >= 1; --i)
#define allrep(V, v) for (auto&& V : v)
#define all(x) (x).begin(), (x).end()
using lint = long long;
const int INF = 1 << 29;
const double EPS = 1e-9;
using namespace std;
#include "../../Lib/cout_stl.cpp"

int main(void) {
  int h, w;
  cin >> h >> w;
  vector<vector<bool>> canvas(h + 2, vector<bool>(w + 2));
  rep1(i, h) {
    rep1(j, w) {
      char tmp;
      cin >> tmp;
      if (tmp == '#') canvas[i][j] = true;
    }
  }
  vector<pair<int, int>> d{{0, -1}, {0, 1}, {-1, 0}, {1, 0}};
  bool flag = true;
  rep1(i, h) {
    rep1(j, w) {
      bool check = false;
      if (!canvas[i][j]) continue;
      allrep(D, d) {
        if (canvas[i + D.first][j + D.second]) {
          check = true;
          break;
        }
      }
      if (!check) flag = false;
    }
  }
  cout << (flag ? "Yes" : "No") << endl;
  return 0;
}

Compiler output:
a.cc:13:10: fatal error: ../../Lib/cout_stl.cpp: No such file or directory
   13 | #include "../../Lib/cout_stl.cpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

3 3
.#.
###
.#.

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

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

int main() {
    int H, W;
    cin >> H >> W;
    char c[55][55];
    int cnt = 0;
    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++;
                }
        }
    }

    cout << (cnt == 0 ?"Yes":"No") << endl;

}

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

#include<iostream>
using namespace std;
int h,k;
char s[50][50];
int main(void){
  cin>>h>>k;
  for(int i=0;i<h;i++)for(int j=0;j<k;j++)cin>>s[i][j];
  for(int i=0 ;i<h;i++)
    for(int j=0 ;j<k;j++){
      bool t=0;
      if(s[i][j]=='#'){
        if(i!=0&&s[i-1][j]=='#')s=1;
        if(i!=h&&s[i+1][j]=='#')s=1;
        if(j!=0&&s[i][j-1]=='#')s=1;
        if(j!=k&&s[i][j+1]=='#')s=1;
        if(!s){
          cout<<"No";
          return 0;
        }
      }
    }
  cout<<"Yes";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:34: error: incompatible types in assignment of 'int' to 'char [50][50]'
   12 |         if(i!=0&&s[i-1][j]=='#')s=1;
      |                                 ~^~
a.cc:13:34: error: incompatible types in assignment of 'int' to 'char [50][50]'
   13 |         if(i!=h&&s[i+1][j]=='#')s=1;
      |                                 ~^~
a.cc:14:34: error: incompatible types in assignment of 'int' to 'char [50][50]'
   14 |         if(j!=0&&s[i][j-1]=='#')s=1;
      |                                 ~^~
a.cc:15:34: error: incompatible types in assignment of 'int' to 'char [50][50]'
   15 |         if(j!=k&&s[i][j+1]=='#')s=1;
      |                                 ~^~
Language: C++

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

int main(){
    int H,W;
    cin >> H >> W;
    char s[100][100];
    for(int i = 0; i < H; i++){
        for(int j = 0; j < W; j++){
            cin >> s[i][j];
        }
    }

    bool ans = true;
    for(int i=0; i<H; i++){
        if(!ans) break;
        int up = i - 1;
        int down = i + 1;
        for(int j = 0; j < W; j++){
            int right = j + 1;
            int left = j - 1;
            if(s[i][j] == '#'){
                check = true;
                if(up >= 0){
                    if(s[up][j] == '#') break;
                }
            
                if(left >= 0){
                    if(s[i][left] == '#') break;
                }
               
                if(down <= H){
                    if(s[down][j] == '#') break;
                }
                
                if(right <= W){
                    if(s[i][right] == '#') break;
                }
                
                ans = false;
            }
        }
    }
    if(ans) cout << "Yes" << endl;
    else cout << "No" << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: 'check' was not declared in this scope
   25 |                 check = true;
      |                 ^~~~~
Language: C++

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

int main(){
  int a,b,d=0;
  cin>>a>>b;
  vector<vector<char>> c(a+2,vector<char>(b+2,.));
  for(int i=1;i<a+1;i++){
    for(int j=1;j<b+1;j++)
      cin>>c.at(i).at(j);
  }
  for(int i=1;i<a+1;i++){
    for(int j=1;j<b+1;j++){
      if(c.at(i).at(j)=='#'){
        if(c.at(i-1).at(j-1)=='.'&&c.at(i-1).at(j+1)=='.'&&c.at(i+1).at(j-1)=='.'&&c.at(i+1).at(j+1)=='.'){
          d=1;
          cout<<"No"<<endl;
          break;
        }
      }
    }
    if(d==1)
      break;
  }
  if(d==0){
    cout<<"Yes"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:42: error: expected primary-expression before '(' token
    7 |   vector<vector<char>> c(a+2,vector<char>(b+2,.));
      |                                          ^
a.cc:7:47: error: expected primary-expression before '.' token
    7 |   vector<vector<char>> c(a+2,vector<char>(b+2,.));
      |                                               ^
a.cc:7:48: error: expected unqualified-id before ')' token
    7 |   vector<vector<char>> c(a+2,vector<char>(b+2,.));
      |                                                ^
Language: C++


#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <queue>

#ifndef U_L_LONG
typedef unsigned long long ULLONG;
#endif
#ifndef L_LONG
typedef long long LLONG;
#endif
template <class _T> static _T tp_abs(const _T& a) {
	//	usage:  tp_abs<type name>(a);
	return ((a < 0) ? (a * -1) : a);
}
template <class _T> static _T tp_min(_T a, _T b) {
	return a < b ? a : b;
}
template <class _T> static _T tp_max(_T a, _T b) {
	return a > b ? a : b;
}
template<class _T> static void get1int(_T& a) {
	const char* fmt = " %d";
	if (sizeof(_T) == sizeof(long long)) {
		fmt = " %lld";
	}

	if (scanf(fmt, &a) < 0) {
		printf("g1int Error\n");
	}
}
template<class _T> static void get2int(_T& a, _T& b) {
	const char* fmt = " %d %d";
	if (sizeof(_T) == sizeof(long long)) {
		fmt = " %lld %lld";
	}

	if (scanf(fmt, &a, &b) < 0) {
		printf("g2int Error\n");
	}
}
template<class _T> static void get3int(_T& a, _T& b, _T& c) {
	const char* fmt = " %d %d %d";
	if (sizeof(_T) == sizeof(long long)) {
		fmt = " %lld %lld %lld";
	}

	if (scanf(fmt, &a, &b, &c) < 0) {
		printf("g3int Error\n");
	}
}
static void getstring(char* buff) {
	if (scanf(" %s", buff) < 0) {
		printf("getstr error!\n");
	}
}

static void ABC096C_GridReplacing();

#if 1
int main()
{
	ABC096C_GridReplacing();
	fflush(stdout);
	return 0;
}
#endif

static bool ABC096C_bfs(char grid[51][51], int nowH, int nowW, int H, int W)
{
	if (grid[nowH][nowW] != '#') return true;

	bool enable = false;
	int dh[] = { 1, 0, -1, 0 };
	int dw[] = { 0, 1, 0, -1 };

	std::queue<std::pair<int, int>> bp;
	bp.push(std::pair<int, int>(nowH, nowW));
		
	while (!bp.empty()) {
		std::pair<int, int> pt = bp.front(); bp.pop();

		for (int i = 0; i < 4; i++) {
			int nh = pt.first + dh[i];
			int nw = pt.second + dw[i];
			if ((nh < H) && (nh >= 0) && (nw < W) && (nw >= 0) && (grid[nh][nw] == '#')) {
				enable = true;
				grid[nh][nw] = '.';
				bp.push(std::pair<int, int>(nh, nw));
			}
		}
	}
	if (enable) grid[nowH][nowW] = '.';
	
	return enable;
}


Compiler output:
a.cc:65:13: warning: 'void ABC096C_GridReplacing()' used but never defined
   65 | static void ABC096C_GridReplacing();
      |             ^~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccSkDiFk.o: in function `main':
a.cc:(.text+0x45): undefined reference to `ABC096C_GridReplacing()'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <vector>
#include <map>

using namespace std;

vector<pair<int,int>> d(4);

int H, W;

int check(int w, int h, vector<vector<char>> &V, vector<vector<bool>> &C){
  int tmp = 1;
  //黒の連結成分に含まれる黒の数をadjにpush_back
    for(int i = 0; i < 4; i++){
      int wp = w + d[i].first;
      int hp = h + d[i].second;
      if(wp < 0 || wp > W - 1 || hp < 0 || hp > H - 1)continue;
      if(V[wp][hp] == '#'){
        tmp += check(wp, hp, V, C);
        C[wp][hp] = true;
      }
    }
  return tmp;
}

int main(){
  d[0] = make_pair(1,0);
  d[1] = make_pair(0,1);
  d[2] = make_pair(-1,0);
  d[3] = make_pair(0,-1);
  
  cin >> H >> W;
  vector<vector<char>> V(H,vector<char> (W,'x'));
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      cin >> V[i][j];
    }
  }
  vector<int> adj;
  vector<vector<bool>> C(H,vector<bool> (W,false));
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      if(C[i][j])continue;
      if(C[i][j] == '#'){
      adj.push_back(check(i ,j ,V, C));
      }
      C[i][j] = true;
    }
  }
  sort(adj.begin(), adj.end());
  if(adj[0] <= 1) cout << "Yes";
  else cout << "No";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   50 |   sort(adj.begin(), adj.end());
      |   ^~~~
      |   short
Language: C++

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

/* #pragma */
/*
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
*/

/*alias*/
#define F first
#define S second

#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define itn int

/*template*/
template<class T>inline bool amax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>inline bool amin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }

/* func */
int GCD(int a,int b){return b?GCD(b,a%b):a;}
long long GCD(long long a, long long b){return b ? GCD(b, a%b) : a;}
int LCM(int a, int b){return a * b / GCD(a, b);}
long long LCM(long long a, long long b){return a * b / GCD(a, b);}

/*struct*/
struct aaa {
	aaa() {
		cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20);
	};
}aaaaaaa;

/* const */
const int INF = 1001001001;
const long long LINF = 1001001001001001001ll;
const int MOD = 1e9 + 7; //10^9
const double EPS = 1e-9;
//const int dx[] = { 1, 1, 0, -1, -1, -1, 0, 1 }, dy[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
//Counterclockwise from the 6o'clock direction
//Take the x-axis downward and the y-axis right

//#define int long long

//g++ -std=c++14 -Wall --pedantic-errors -o template template.cpp
//g++ -std=c++14 -Wall --pedantic-errors template.cpp
//chcp 65001

signed main()
{
	int h,w; cin >> h >> w;

	vector<vector<char>> c(h+1, vector<char>(w+1));

int cnt{};
	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 = １; 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:66:30: error: '\U0000ff11' was not declared in this scope
   66 |                 for (int j = １; j <= w; j++) {
      |                              ^~
Language: C++

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

/* #pragma */
/*
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
*/

/*alias*/
#define F first
#define S second

#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define itn int

/*template*/
template<class T>inline bool amax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>inline bool amin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }

/* func */
int GCD(int a,int b){return b?GCD(b,a%b):a;}
long long GCD(long long a, long long b){return b ? GCD(b, a%b) : a;}
int LCM(int a, int b){return a * b / GCD(a, b);}
long long LCM(long long a, long long b){return a * b / GCD(a, b);}

/*struct*/
struct aaa {
	aaa() {
		cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20);
	};
}aaaaaaa;

/* const */
const int INF = 1001001001;
const long long LINF = 1001001001001001001ll;
const int MOD = 1e9 + 7; //10^9
const double EPS = 1e-9;
//const int dx[] = { 1, 1, 0, -1, -1, -1, 0, 1 }, dy[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
//Counterclockwise from the 6o'clock direction
//Take the x-axis downward and the y-axis right

//#define int long long

//g++ -std=c++14 -Wall --pedantic-errors -o template template.cpp
//g++ -std=c++14 -Wall --pedantic-errors template.cpp
//chcp 65001

signed main()
{
	int h,w; cin >> h >> w;

	vector<vector<char>> v(h+1, vector<char>(w+1));

int cnt{};
	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 = １; 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:63:53: error: 'c' was not declared in this scope
   63 |                 for (int j = 1; j <= w; j++) cin >> c[i][j];
      |                                                     ^
a.cc:66:30: error: '\U0000ff11' was not declared in this scope
   66 |                 for (int j = １; j <= w; j++) {
      |                              ^~
a.cc:67:29: error: 'c' was not declared in this scope
   67 |                         if (c[i][j] == '#' && c[i][j - 1] != '#' && c[i - 1][j] != '#' && c[i][j + 1] != '#' && c[i + 1][j] != '#') cnt++;
      |                             ^
Language: C++

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

/* #pragma */
/*
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
*/

/*alias*/
#define F first
#define S second

#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define itn int

/*template*/
template<class T>inline bool amax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>inline bool amin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }

/* func */
int GCD(int a,int b){return b?GCD(b,a%b):a;}
long long GCD(long long a, long long b){return b ? GCD(b, a%b) : a;}
int LCM(int a, int b){return a * b / GCD(a, b);}
long long LCM(long long a, long long b){return a * b / GCD(a, b);}

/*struct*/
struct aaa {
	aaa() {
		cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20);
	};
}aaaaaaa;

/* const */
const int INF = 1001001001;
const long long LINF = 1001001001001001001ll;
const int MOD = 1e9 + 7; //10^9
const double EPS = 1e-9;
//const int dx[] = { 1, 1, 0, -1, -1, -1, 0, 1 }, dy[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
//Counterclockwise from the 6o'clock direction
//Take the x-axis downward and the y-axis right

//#define int long long

//g++ -std=c++14 -Wall --pedantic-errors -o template template.cpp
//g++ -std=c++14 -Wall --pedantic-errors template.cpp
//chcp 65001

signed main()
{
	int h,w; cin >> h >> w;

	vector<string> c(h+1);

int cnt{};
	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:63:38: error: 'W' was not declared in this scope
   63 |                 for (int j = 1; j <= W; j++) cin >> c[i][j];
      |                                      ^
Language: C++

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

/* #pragma */
/*
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
*/

/*alias*/
#define F first
#define S second

#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define itn int

/*template*/
template<class T>inline bool amax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>inline bool amin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }

/* func */
int GCD(int a,int b){return b?GCD(b,a%b):a;}
long long GCD(long long a, long long b){return b ? GCD(b, a%b) : a;}
int LCM(int a, int b){return a * b / GCD(a, b);}
long long LCM(long long a, long long b){return a * b / GCD(a, b);}

/*struct*/
struct aaa {
	aaa() {
		cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20);
	};
}aaaaaaa;

/* const */
const int INF = 1001001001;
const long long LINF = 1001001001001001001ll;
const int MOD = 1e9 + 7; //10^9
const double EPS = 1e-9;
//const int dx[] = { 1, 1, 0, -1, -1, -1, 0, 1 }, dy[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
//Counterclockwise from the 6o'clock direction
//Take the x-axis downward and the y-axis right

//#define int long long

//g++ -std=c++14 -Wall --pedantic-errors -o template template.cpp
//g++ -std=c++14 -Wall --pedantic-errors template.cpp
//chcp 65001

signed main()
{
	int h,w; cin >> h >> w;

	vector<string> v(h);

	for(int i = 0, i_len = (int)h; i < i_len; ++i){
		cin >> v.at(i);
	}

	for(int i = 0; i < h; ++i){
		for(int j = 0; j < w; ++j){
			int cnt{};
			for(int k = 0; k < 4; ++k){
				int x{},y{};
				x = i+dx[k]; y = j+dy[k];
					if(v[x][y] != '#'){
						cnt++
					}			
			}
			cnt -= 4;
			if(cnt == 0){
				cout << "No" << endl;
				return 0;
			}				
		}
	}
cout << "Yes" << endl;
    return 0;
}

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

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

const int dy[4] = {-1, 0, 0, 1};
const int dx[4] = {0, -1, 1, 0};
int main() {
    int H;
    int W;
    vector<vector<char>> s(H + 1, vector<char>(W + 1));

    REP(i, H) {
        REP(j, W) { cin >> s[i][j]; }
    }
    //孤立しているマスを探す
    REP(i, H - 1) {
        i++;
        REP(j, W - 1) {
            j++;
            if(s[i][j] == '.') {
                continue;
            }
            int cnt = 0;
            REP(k, 4) {
                if(s[i+dx[k]][j+dy[k] == '#'){
                    cnt++;
                }
            }
            if(cnt == 0) {
                cout << "No" << endl;
                return 0;
            }
        }
    }
    cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:45: error: expected ']' before ')' token
   52 |                 if(s[i+dx[k]][j+dy[k] == '#'){
      |                                             ^
      |                                             ]
Language: C++

std::vector<int> &std::vector<std::vector<int>>::operator[](size_t _Pos)
+1 overload



Compiler output:
a.cc:1:6: error: 'vector' in namespace 'std' does not name a template type
    1 | std::vector<int> &std::vector<std::vector<int>>::operator[](size_t _Pos)
      |      ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | std::vector<int> &std::vector<std::vector<int>>::operator[](size_t _Pos)
Language: C++

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

const ll INF = 1LL << 60;

int main(){
    int h,w;
    cin >> h >> w;
    vector<vector<int>> v(50,vector<int>(50));
    rep(i,h){
        rep(j,w){
            cin >> v[i][j];
        }
    }
    rep(i,h){
        rep(j,w){
            if(v[i][j]=='#'&&v[i][j+1]=='.'&&v[i][j-1]=='.'&&v[i+1][j]=='.'&&v[i-1][j]=='.'){
                cout << "No" << endl;
                retunr 0;
            }
        }
    }
    cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: 'retunr' was not declared in this scope
   23 |                 retunr 0;
      |                 ^~~~~~
Language: C++

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

int main(){
  int H, W;
  cin >> H >> W;
  vector<vector<char>> s(H, vector<char>(W));
  for(int i = 0; i < W; i++){
    for(int j = 0; j < H; j++){
      cin >> s.at(i).at(j);
    }
  }
  
  vector<int> dx = {0, -1, 1, 0};
  vector<int> dy = {1, 0, 0, -1};

  for(int i = 0; i < W; i++){
    for(int j = 0; j < H; j++){
      if(s.at(i).at(j)=='#'){
        int cnt = 0;
        for(int k = 0; k < 4; k++){
          int x = i + dx.at(k);
          int y = j + dy.at(k);
          //cout << x << y << endl;
          if(x==W or y==H)	continue;
          if(x<0 or y<0)	continue;
          if(s.at(x).at(y)=='#')	cnt++;
        }
        if(cnt==0){
          cout << "No" << endl;
          return;
        }
      }
    }
  }

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

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

#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(void){
  int H,W;
  cin >> H >> W;
  
  vector<vector<char>>grid(H + 2,vector<char>(W + 2,'p'));
  
  for(int i=1;i<=H;i++){
    for(int j=0;j<=W;j++;)
    cin >> grid[i][j];
  }
  
  bool ans = true;
  
  for(int i=1;i<=H;i++){
    for(int j=1;j<=W;j++){
      if(grid[i][j] == '#'){
        if(grid[i - 1][j] != '#' && grid[i + 1][j] != '#' && grid[i][j - 1] != '#' && grid[i][j + 1] != '#')
          ans = false;
      }
    }
  }
  
  if(ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: expected ')' before ';' token
   12 |     for(int j=0;j<=W;j++;)
      |        ~                ^
      |                         )
a.cc:12:26: error: expected primary-expression before ')' token
   12 |     for(int j=0;j<=W;j++;)
      |                          ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(void){
  int H,W;
  cin >> H >> W;
  
  vector<vector<char>>grid(H + 2,vector<char>(W + 2,''));
  
  for(int i=1;i<=H;i++){
    for(int j=0;j<=W;j++;)
    cin >> grid[i][j];
  }
  
  bool ans = true;
  
  for(int i=1;i<=H;i++){
    for(int j=1;j<=W;j++){
      if(grid[i][j] == '#'){
        if(grid[i - 1][j] != '#' && grid[i + 1][j] != '#' && grid[i][j - 1] != '#' && grid[i][j + 1] != '#')
          ans = false;
      }
    }
  }
  
  if(ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  
  return 0;
}

        
      

Compiler output:
a.cc:9:53: error: empty character constant
    9 |   vector<vector<char>>grid(H + 2,vector<char>(W + 2,''));
      |                                                     ^~
a.cc: In function 'int main()':
a.cc:12:25: error: expected ')' before ';' token
   12 |     for(int j=0;j<=W;j++;)
      |        ~                ^
      |                         )
a.cc:12:26: error: expected primary-expression before ')' token
   12 |     for(int j=0;j<=W;j++;)
      |                          ^
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int h=sc.nextInt(),w=sc.nextInt();
        boolean[][] input=new boolean[h][w];
        String
        
        


    }
}

Compiler output:
Main.java:8: error: not a statement
        String
        ^
Main.java:8: error: ';' expected
        String
              ^
2 errors
Language: C++

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

int main(void){
 
  int H,W;
  
  cin >> H >> W;
  
  string s[H];
  
  //上下左右を調べるための配列を作成
  int dh[] = { -1,  0, 0, 1 };
  int dw[] = {  0, -1, 1, 0 };
    
  for(int i = 0; i < H; ++i) cin >> s[i];
  
  bool result = true;
  
  for(int i = 0; i < H; ++i){
  	for(int j = 0; j < W; ++j){
      //判定済みの場合はとばす
      if(s[i][j] == '1'){ continue; } 	
      else if(s[i][j] == '#'){
        bool can = false;
        //上下左右に隣接する'#'マスがあるか判定
        for(int k = 0; k < 4; ++k){
          int h = i + dh[k];
          int w = j + dw[k];
          //見つかった段階でループを抜ける
          if(h >= 0 && h < H && w >= 0 && w < W && 
             s[h][k] == '#' && s[h][k] == '1') {
            can = true;
            //繰り返し判定しなくて済むように判定済みの番号をいれておく
            s[i][j] = '1';
            s[h][k] = '1';
            break;
          }
       }
       if(!can) result = false;
    }
  }
    
  if(result) cout << "Yes" << endl;
  else       cout << "No"  << endl;
  
  
  return 0;
}


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

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

int main(void){
 
  int H,W;
  
  cin >> H >> W;
  
  string s[H];
  
  //上下左右を調べるための配列を作成
  int dh[] = { -1,  0, 0, 1 };
  int dw[] = {  0, -1, 1, 0 };
    
  for(int i = 0; i < H; ++i) cin >> s[i];
  
  bool result = true;
  
  for(int i = 0; i < H; ++i){
  	for(int j = 0; j < W; ++j){
      //判定済みの場合はとばす
      if(s[i][j] == '◯'){ continue; } 	
      else if(s[i][j] == '#'){
        bool can = false;
        //上下左右に隣接する'#'マスがあるか判定
        for(int k = 0; k < 4; ++k){
          int h = i + dh[k];
          int w = j + dw[k];
          //見つかった段階でループを抜ける
          if(h >= 0 && h < H && w >= 0 && w < W && 
             s[h][k] == '#' && s[h][k] == '◯') {
            can = true;
            //繰り返し判定しなくて済むように判定済みの記号をいれておく
            s[i][j] = '◯';
            s[h][k] = '◯';
            break;
          }
       }
       if(!can) result = false;
    }
  }
    
  if(result) cout << "Yes" << endl;
  else       cout << "No"  << endl;
  
  
  return 0;
}

Compiler output:
a.cc:24:21: warning: multi-character character constant [-Wmultichar]
   24 |       if(s[i][j] == '◯'){ continue; }
      |                     ^~~
a.cc:33:43: warning: multi-character character constant [-Wmultichar]
   33 |              s[h][k] == '#' && s[h][k] == '◯') {
      |                                           ^~~
a.cc:36:23: warning: multi-character character constant [-Wmultichar]
   36 |             s[i][j] = '◯';
      |                       ^~~
a.cc:37:23: warning: multi-character character constant [-Wmultichar]
   37 |             s[h][k] = '◯';
      |                       ^~~
a.cc: In function 'int main()':
a.cc:36:23: warning: overflow in conversion from 'int' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} changes value from '14849967' to '-81' [-Woverflow]
   36 |             s[i][j] = '◯';
      |                       ^~~
a.cc:37:23: warning: overflow in conversion from 'int' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} changes value from '14849967' to '-81' [-Woverflow]
   37 |             s[h][k] = '◯';
      |                       ^~~
a.cc:50:2: error: expected '}' at end of input
   50 | }
      |  ^
a.cc:5:15: note: to match this '{'
    5 | int main(void){
      |               ^
Language: C++

#include<iostream>

using namespace std;

int H,W;
int main () {
    cin >> H >> W;
    for(int i=1; i<=H; i++)
        for(int j=1; j<=W; j++)
            cin >> tb[i][j];

    for(int i=1; i<=H; i++) {
        for(int j=1; j<=W; j++) {
            if( tb[i][j] == '#') {
                bool flag = false;
                for(int k=0; k<4; k++) {
                    int nx = j + dx[k];
                    int ny = i + dy[k];
                    if( tb[ny][nx] == '#' ) flag = true;
                }
                if(!flag) {
                    cout << "No" << endl;
                    return 0;
                }
            }
        }
    }
    cout << "Yes" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 'tb' was not declared in this scope; did you mean 'tm'?
   10 |             cin >> tb[i][j];
      |                    ^~
      |                    tm
a.cc:14:17: error: 'tb' was not declared in this scope; did you mean 'tm'?
   14 |             if( tb[i][j] == '#') {
      |                 ^~
      |                 tm
a.cc:17:34: error: 'dx' was not declared in this scope; did you mean 'nx'?
   17 |                     int nx = j + dx[k];
      |                                  ^~
      |                                  nx
a.cc:18:34: error: 'dy' was not declared in this scope; did you mean 'ny'?
   18 |                     int ny = i + dy[k];
      |                                  ^~
      |                                  ny
Language: C++

int H,W;
int main () {
    cin >> H >> W;
    for(int i=1; i<=H; i++)
        for(int j=1; j<=W; j++)
            cin >> tb[i][j];

    for(int i=1; i<=H; i++) {
        for(int j=1; j<=W; j++) {
            if( tb[i][j] == '#') {
                bool flag = false;
                for(int k=0; k<4; k++) {
                    int nx = j + dx[k];
                    int ny = i + dy[k];
                    if( tb[ny][nx] == '#' ) flag = true;
                }
                if(!flag) {
                    cout << "No" << endl;
                    return 0;
                }
            }
        }
    }
    cout << "Yes" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> H >> W;
      |     ^~~
a.cc:6:20: error: 'tb' was not declared in this scope
    6 |             cin >> tb[i][j];
      |                    ^~
a.cc:10:17: error: 'tb' was not declared in this scope
   10 |             if( tb[i][j] == '#') {
      |                 ^~
a.cc:13:34: error: 'dx' was not declared in this scope; did you mean 'nx'?
   13 |                     int nx = j + dx[k];
      |                                  ^~
      |                                  nx
a.cc:14:34: error: 'dy' was not declared in this scope; did you mean 'ny'?
   14 |                     int ny = i + dy[k];
      |                                  ^~
      |                                  ny
a.cc:18:21: error: 'cout' was not declared in this scope
   18 |                     cout << "No" << endl;
      |                     ^~~~
a.cc:18:37: error: 'endl' was not declared in this scope
   18 |                     cout << "No" << endl;
      |                                     ^~~~
a.cc:24:5: error: 'cout' was not declared in this scope
   24 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:24:22: error: 'endl' was not declared in this scope
   24 |     cout << "Yes" << endl;
      |                      ^~~~
Language: C++

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

int main(){
  int H,W;
  cin >> H >> W;
  string S[H];
  rep(i,H) cin >> S[i];
  int dx[4]={-1,0,1,0};
  int dy[4]={0,-1,0,1};
  bool f=ture;
  rep(i,H) rep(j,W){
    if (S[i][j]=='#'){
      bool f2=true;
      rep(k,4){
        if(i+dx[k]>=0 and i+dx[k]<H and j+dy[k]>=0 and j+dy[k]<W){
          if(S[i+dx[k]][j+dy[k]]=='#') f2=false;
        }
      }
      if(f2) f=false;
    }
  }
  if(f) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'ture' was not declared in this scope
   13 |   bool f=ture;
      |          ^~~~
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int dx[] = {-1, 0, 1, 0};
        int dy[] = {0, 1, 0, -1};
        chat map[][] = new char[n][m];
        for(int i=0; i<n; i++){
            map[n] = sc.nextLine().toCharArray();
        }
        for(int i=0; i<n; i++){
            for(int j=0; j<m; j++){
                if(map[i][j]=='#'){
                    for(int k=0; k<4; k++){
                        boolean ans = false;
                        if(i+dx[k]>=0 && i+dx[k]<m && j+dy[k]>=0 && j+dy[k]<n){
                            if(map[i+dx[k]][j+dy[k]]=='#'){
                                ans = true;
                            }
                            if(ans){
                                break;
                            }
                            if(k==3){
                                System.out.println("No");
                                return;
                            }
                        }
                    }
                }
            }
        }
        System.out.println("Yes");
        
    }
}


Compiler output:
Main.java:9: error: cannot find symbol
        chat map[][] = new char[n][m];
        ^
  symbol:   class chat
  location: class Main
1 error
Language: C++

#include<iostream>
using namespace std;

char grid[60][60];
int H, W;
bool flag;

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

  frag = false;
  for(int i = 1; i <= H; i++){
    for(int j = 1; j <= W; j++) {
      if(grid[i][j] == '#' && grid[i-1][j] != '#' && grid[i+1][j] != '#' && grid[i][j-1] != '#' && grid[i][j+1] != '#' ) flag = true;
    }
  }
  if(!flag){
    cout << "Yes" <<endl;
  }else{
    cout << "No" << endl;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'frag' was not declared in this scope; did you mean 'flag'?
   15 |   frag = false;
      |   ^~~~
      |   flag
Language: C++

#include<iostream>
using namespace std;

char grid[60][60];
int H, W;
bool flag;

int main(){
  for(int i = 1; i <= H; i++){
    for(int i = 1; i <= W; i++) cin >> c[i][j]{
      if(c[i][j] == '#' && c[i-1][j] != '#' && c[i+1][j] != '#' && c[i][j-1] == '#' && c[i][j+1] == '#' ) flag = true;
    }
  }
  if(!flag)cout << "Yes" <<endl;
  else cout << "no" << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:40: error: 'c' was not declared in this scope
   10 |     for(int i = 1; i <= W; i++) cin >> c[i][j]{
      |                                        ^
a.cc:10:45: error: 'j' was not declared in this scope
   10 |     for(int i = 1; i <= W; i++) cin >> c[i][j]{
      |                                             ^
Language: C++

#include<algorithm>
#include<iomanip>
#include<iostream>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<vector>
#include<bitset>
#include<cmath>
#define FOR(i,a,b) for(int i=(a); i<int(b); ++i)
#define RFOR(i,a,b) for(int i=(b)-1; i>=int(a); --i)
#define rep(i,n) FOR(i,0,n)
#define rep1(i,n) FOR(i,1,int(n)+1)
#define rrep(i, n) RFOR(i, 0, n)
#define rrep1(i, n) RFOR(i, 1, int(n) + 1)
#define all(c) begin(c), end(c)
#define al(d) d.begin(),d.end()
using namespace std;
template <typename T>
void putv(vector<T>& V){
	// cout << "The elements in the vector are: " << endl;
	for(auto x: V)
		cout << x << " ";
	cout << endl;
}
template <class T>
vector<T> getv(int n){
	vector<T> vec;
	rep(i,n){
		T input;
		cin >> input;
		vec.emplace_back(input);
	}
	return vec;
}

bool search(int x, int y);
int H,W;
vector<string> s;
int main(){
	cin >>H>>W;
	s = getv<string>(H);

	bool ans = true;
	rep(x,H){
		if(!ans) break;
		rep(y,W){
			if(!ans) break;
			if(s[x][y]=='#' && !search(x,y)) ans = false;
		}
	}
	Out(ans);
}

// 上下左右のいずれかに黒が隣接していればtrueを返す
bool search(int x, int y){
	if(0<=x-1 && s[x-1][y] == '#') return true;
	if(0<=y-1 && s[x][y-1] == '#') return true;
	if(y+1<W  && s[x][y+1] == '#') return true;
	if(x+1<H  && s[x+1][y] == '#') return true;
	return false;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:9: error: 'Out' was not declared in this scope
   53 |         Out(ans);
      |         ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int H,W;
string board[50];
int dh[]={-1,1,0,,0};
int dw[]={0,0,-1,1};
string ans="Yes";
int nh,w;
bool connected;

int main(){
  cin >>H >>W;
  for(int i=0;i<H;i++)cin >>board[i];
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
    	if(board[i][j]=='#'){
          connected=false;
        for(int k=0;k<4;k++){
          nh=board[i][j]+dh[k];
          nw=board[i][j]+dw[k];
          if(nh<0||nh>=H)continue;
          if(nw<0||nw>=W)continue;
          if(board[nh][nw]=='#'){
            connected=true;
            break;
          }
        }
          if(connected=false){
            ans="No";
          cout <<ans<<Endl;
            return 0;
          }
    }    
  }}
	cout <<ans<<endl;

}

Compiler output:
a.cc:5:18: error: expected primary-expression before ',' token
    5 | int dh[]={-1,1,0,,0};
      |                  ^
a.cc: In function 'int main()':
a.cc:20:11: error: 'nw' was not declared in this scope; did you mean 'w'?
   20 |           nw=board[i][j]+dw[k];
      |           ^~
      |           w
a.cc:30:23: error: 'Endl' was not declared in this scope
   30 |           cout <<ans<<Endl;
      |                       ^~~~
Language: C++

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


int main() {
  int H,W;

  cin >> H >> W;

  string s[60];

  s[0] = ".";
  for(int i=0;i<W+1;i++){
    s[0]+=".";
  }  
  s[H+1] = ".";
  for(int i=0;i<W+1;i++){
    s[H+1]+=".";
  }

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


  for(int i=1;i<H;i++){
    for(int j=1;j<W;j++){
      if(s[i][j]=='#'){
        if(!(s[i-1][j]=='#' || s[i][j-1]=='#' || s[i][j+1]=='#' || s[i+1][j]=='#')){
          cout << No << endl; return 0;
        }
      }
    }
  }

  cout << Yes << endl;

  

  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:19: error: 'No' was not declared in this scope
   33 |           cout << No << endl; return 0;
      |                   ^~
a.cc:39:11: error: 'Yes' was not declared in this scope
   39 |   cout << Yes << endl;
      |           ^~~
Language: C++

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

int main() {
int h,w; cin>>h>>w;
  char a[h+2][w+2];
  for(int i=0;i<w+2;i++) {a[0][i]='.';
               a[h+1][i]='.';}
  for(int i=1;i<h+1;i++){a[i][0]='.';
                         a[i][w+1]='.';}
  
  bool res=true;
  bool bre=false;
for(int i=1;i<h+1;i++){
  for(int j=1;j<w+1;j++){
      if(a[i+1][j]=="."&&a[i-1][j]=="."&&a[i][j+1]=="."&&a[i][j-1]=="."){
        res=false;
        bre=true;
        break;
      }
    }
  if(bre) break;
  }
  
  if(res) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |       if(a[i+1][j]=="."&&a[i-1][j]=="."&&a[i][j+1]=="."&&a[i][j-1]=="."){
      |          ~~~~~~~~~^~~~~
a.cc:19:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |       if(a[i+1][j]=="."&&a[i-1][j]=="."&&a[i][j+1]=="."&&a[i][j-1]=="."){
      |                          ~~~~~~~~~^~~~~
a.cc:19:51: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |       if(a[i+1][j]=="."&&a[i-1][j]=="."&&a[i][j+1]=="."&&a[i][j-1]=="."){
      |                                          ~~~~~~~~~^~~~~
a.cc:19:67: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |       if(a[i+1][j]=="."&&a[i-1][j]=="."&&a[i][j+1]=="."&&a[i][j-1]=="."){
      |                                                          ~~~~~~~~~^~~~~
Language: C++

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

int main() {
int h,w; cin>>h>>w;
  char a[h+2][w+2];
  for(int i=0;i<w+2;i++) {a[0][i]='.';
               a[h+1][i]='.';}
  rep(int i=1;i<h+1;i++){a[i][0]='.';
                         a[i][w+1]='.';}
  
  bool res=true;
  bool bre=false;
for(int i=1;i<h+1;i++){
  for(int j=1;j<w+1;j++){
      if(a[i+1][j]=="."&&a[i-1][j]=="."&&a[i][j+1]=="."&&a[i][j-1]=="."){
        res=false;
        bre=true;
        break;
      }
    }
  if(bre) break;
  }
  
  if(res) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;

}

Compiler output:
a.cc:12:24: error: macro "rep" requires 2 arguments, but only 1 given
   12 |   rep(int i=1;i<h+1;i++){a[i][0]='.';
      |                        ^
a.cc:3:9: note: macro "rep" defined here
    3 | #define rep(i, n) for(int i = 0; i < (int)(n); i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:12:3: error: 'rep' was not declared in this scope
   12 |   rep(int i=1;i<h+1;i++){a[i][0]='.';
      |   ^~~
a.cc:19:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |       if(a[i+1][j]=="."&&a[i-1][j]=="."&&a[i][j+1]=="."&&a[i][j-1]=="."){
      |          ~~~~~~~~~^~~~~
a.cc:19:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |       if(a[i+1][j]=="."&&a[i-1][j]=="."&&a[i][j+1]=="."&&a[i][j-1]=="."){
      |                          ~~~~~~~~~^~~~~
a.cc:19:51: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |       if(a[i+1][j]=="."&&a[i-1][j]=="."&&a[i][j+1]=="."&&a[i][j-1]=="."){
      |                                          ~~~~~~~~~^~~~~
a.cc:19:67: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |       if(a[i+1][j]=="."&&a[i-1][j]=="."&&a[i][j+1]=="."&&a[i][j-1]=="."){
      |                                                          ~~~~~~~~~^~~~~