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

#include <iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<math.h>
using namespace std;
#define maxx 55
int  a[maxx][maxx];
int h,w;
int main()
{
    memset(a,0,sizeof(a));
    scanf("%d%d",&h,&w);
    getchar();
    for(int i=1;i<=w;i++)
    {
        for(int j=1;j<=h;j++)
        {
            char c=getchar();
            if(c=='#')
            {
                a[i][j]=1;
            }
            else
                a[i][j]=2;
        }
        getchar();
    }
    int flag=1;
    for(int i=1;i<=w;i++)
    {
        for(int j=1;j<=h;j++)
        {
            if(a[i][j]==1){
            if(!( (a[i][j]==a[i][j+1])||(a[i][j]==a[i][j-1])||(a[i][j]==a[i-1][j])||(a[i][j]==a[i+1][j]) ) )
            {
                flag=0;
            }
            }
        }

    }
    if(flag==1)
    printf("Yes");
    else
        printf("No";)





//    for(int i=1;i<=w;i++)
//    {
//        for(int j=1;j<=h;j++)
//        {
//            cout<<a[i][j];
//        }
//        cout<<endl;
//    }

    //cout << "Hello world!" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:20: error: expected ')' before ';' token
   46 |         printf("No";)
      |               ~    ^
      |                    )
a.cc:46:21: error: expected primary-expression before ')' token
   46 |         printf("No";)
      |                     ^
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int H, W;
char s[60][60];

int main(void) {
	cin >> H >> W;

	for (int i = 0; i < H; i++) {
		scanf_s("%s", &s[i]);
	}

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


	bool ans = true;
	for (int i = 0; i < H; i++) {
		for (int j = 0; i < 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:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   13 |                 scanf_s("%s", &s[i]);
      |                 ^~~~~~~
      |                 scanf
Language: C++

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

int main() {
    int H, W;
    char s[60][60];
    int dx[4] = {1, -1, 0, 0};
    int dy[4] = {0, 0, 1 ,-1};
    cin >> H >> W;
    for (int i = 0; i < W; i++) {
        scanf("%s", &s[]);
    }

    bool can = true;
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W+ 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) can = false;
        }
    }
    if (can) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: expected primary-expression before ']' token
   11 |         scanf("%s", &s[]);
      |                        ^
a.cc:16:35: error: expected ';' before ')' token
   16 |         for (int j = 0; j < W+ j++) {
      |                                   ^
      |                                   ;
Language: C++

#include <iostream>
#define fo(i,a,b) for(int i=a; i<=b; ++i)
using namespace std;

const int N = 55;

const int x[] = {-1, 1, 0, 0};
const int y[] = {0, 0, -1, 1};
bool judge(int, int);
char grid[N][N];

int main(){
	int H, W; cin >> H >> W;
	int f=1;
	fo(i,0,H-1) fo(j,0,W-1) cin >> grid[i][j];
	fo(i,0,H-1) fo(j,0,W-1)
		if (!judge(i, j)){ 
			cout << "No\n";
			f=0;
			break;
		}
	if (f) cout << "Yes\n";
	return 0;
}

bool judge(int i, int j){
	for(k,0,3){
		if (i+x[k]>=0 && i+x[k]<H && j+y[k]>=0 && j+y[k]<W)
			if (grid[i+x[k]][j+y[k]] == '#') return true;
	}
	return false;
}

Compiler output:
a.cc: In function 'bool judge(int, int)':
a.cc:27:13: error: 'k' was not declared in this scope
   27 |         for(k,0,3){
      |             ^
a.cc:31:9: error: expected primary-expression before 'return'
   31 |         return false;
      |         ^~~~~~
a.cc:30:10: error: expected ';' before 'return'
   30 |         }
      |          ^
      |          ;
   31 |         return false;
      |         ~~~~~~
a.cc:31:9: error: expected primary-expression before 'return'
   31 |         return false;
      |         ^~~~~~
a.cc:30:10: error: expected ')' before 'return'
   30 |         }
      |          ^
      |          )
   31 |         return false;
      |         ~~~~~~
a.cc:27:12: note: to match this '('
   27 |         for(k,0,3){
      |            ^
a.cc:32:1: warning: control reaches end of non-void function [-Wreturn-type]
   32 | }
      | ^
Language: Java

import java.util.*;

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

		char s[][]=new char[52][52];

		for(int i=0;i<h+2;i++){
            for(int j=0;j<w+2;j++) s[i][j]='.';
        }

		for(int i=1;i<=w;i++){
			String str=sc.next();
			for(int j=1;j<=h;j++){
				s[i][j]=str.charAt(j-1);
			}
		} 

		int[] y={0,1,0,-1};
        int[] x={1,0,-1,0};

		for(int i=1;i<=w;i++){
			for(int j=1;j<=h;j++){
				if(s[i][j]=='#' && flag==0) {
					for(int k=0;k<4;k++) {
                        if(!(map[i+x[k]][j+y[k]]=='#')) flag=1;
                    }
				}
			}
		} 

		if(flag==0) System.out.println("Yes");
		else System.out.println("No");
	}
}

Compiler output:
Main.java:30: error: cannot find symbol
                        if(!(map[i+x[k]][j+y[k]]=='#')) flag=1;
                             ^
  symbol:   variable map
  location: class Main
1 error
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<cstdlib>
#include<cstdio>
#include<utility>
using namespace std;
void dfs(int, int, int, int);
char field[50][50+1];
int main(){
  int H,W,cnt=0;
  cin>>H>>W;
  
  /*for(int i=0;i<H;i++){
    for(int j=0;j<W;j++)field[i][j]=" ";
  }*///初期化
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++)cin>>field[i][j];
  }
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      if(field[i][j] == '#')dfs(i, j, H, W);
    }
  }
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      if(field[i][j] == '.')cnt++;
    }
  }
  if(cnt == H*W)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  return 0;
}
void dfs(int x, int y, int H, int W){
  field[x][y] = '.';
  int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};//移動4方向のベクトル
  for(int i=0;i<4;i++){
    int nx = x + dx[i], ny = y + dy[i];
    if(0<=nx && nx < W && 0 <= ny && ny < H && field[nx][ny] == '#') dfs(nx, ny);
  }
  return ;
}

Compiler output:
a.cc: In function 'void dfs(int, int, int, int)':
a.cc:43:73: error: too few arguments to function 'void dfs(int, int, int, int)'
   43 |     if(0<=nx && nx < W && 0 <= ny && ny < H && field[nx][ny] == '#') dfs(nx, ny);
      |                                                                      ~~~^~~~~~~~
a.cc:38:6: note: declared here
   38 | void dfs(int x, int y, int H, int W){
      |      ^~~
Language: C

#include <iostream>
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:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

class Main {
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	      int H = sc.nextInt();
	      int W = sc.nextInt(); sc.nextLine(); //nextIntの後残る改行文字を消す
	      String[] line = new String[W];
	      int r=0;
	      for(int i=0;i<W;i++){
	      	line[i]=sc.nextLine();
	      } 
	      char[][] a = new char[H][W];
	      char[][] b = new char[H+2][W+2];
	         for(int j=0;j<W;j++){
	          for(int k=0;k<H;k++){
	           a[k][j]=line[j].charAt(k);
	           b[k+1][j+1]=a[k][j];
	          }
	         }
	         sc.close();
	         for(int j=0;j<W+2;j++){
	          for(int k=0;k<H+2;k++){
	           b[0][j]='.';
	           b[H+1][j]='.';
	           b[k][0]='.';
	           b[k][W+1]='.';
	          }
	         }
	          
	         for(int j=1;j<W+1;j++){
	          for(int k=1;k<H+1;k++){
	          if(b[k][j]=='#'&&b[k+1][j]=='.'&&b[k-1][j]=='.'&&b[k][j+1]=='.'&&b[k][j-1]=='.'){
	                                       r+=1;
	                      }else{
	                                       r+=0;
	                       }
	           }
	          }
	           if(r>0){
	                 System.out.println("No");
	           }else{
	                 System.out.println("Yes");      
	           }
    }
 
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	      int H = sc.nextInt();
	      int W = sc.nextInt(); sc.nextLine(); //nextIntの後残る改行文字を消す
	      String[] line = new String[W];
	      int r=0;
	      for(int i=0;i<W;i++){
	      	line[i]=sc.nextLine();
	      } 
	      char[][] a = new char[H][W];
	      char[][] b = new char[H+2][W+2];
	         for(int j=0;j<W;j++){
	          for(int k=0;k<H;k++){
	           a[k][j]=line[j].charAt(k);
	           b[k+1][j+1]=a[k][j];
	          }
	         }
	         sc.close();
	         for(int j=0;j<W+2;j++){
	          for(int k=0;k<H+2;k++){
	           b[0][j]='.';
	           b[H+1][j]='.';
	           b[k][0]='.';
	           b[k][W+1]='.';
	          }
	         }
	          
	         for(int j=1;j<W+1;j++){
	          for(int k=1;k<H+1;k++){
	          if(b[k][j]=='#'&&b[k+1][j]=='.'&&b[k-1][j]=='.'&&b[k][j+1]=='.'&&b[k][j-1]=='.'){
	                                       r+=1;
	                      }else{
	                                       r+=0;
	                       }
	           }
	          }
	           if(r>0){
	                 System.out.println("No");
	           }else{
	                 System.out.println("Yes");      
	           }
    }

}


Compiler output:
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <cstdio>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <string>
#include <cstdlib>
#include <iostream>
#include <cmath>

using namespace std;

int main() {
  int h,w;
  cin>>h>>w;
  string ss[50];
  for(int i=0;i<h;++i) {
    cin>>ss[i];
  }
  for(int j=0;j<h;++j) {
    for(int i=0;i<w;++i) {
      bool f=
        (ss[j][i]=='.')
        || (i>0&&ss[j][i-1]=='#')
        || (j>0&&ss[j-1][i]=='#')
        || (i<w-1&&ss[j][i+1]=='#')
        || (j<h-1&&ss[j+1][i]=='#');
      if(!f) {
        cout<<"No"<<endl;
        return;
      }
    }
  }
  cout<<"Yes"<<endl;
}


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

#include<bits/stdc++.h>
using namespace std;
char maze[55][55];
int vis[55][55];
int n,m;
int d[4][2]={{1,0},{-1,0},{0,1},{0,-1}};
int ans;
void dfs(int x,int y)
{
   //if(maze[x][y]=='.')return false;
   vis[x][y]=1;
   int flag=0;
   for(int i=0;i<4;i++)
   {
       int xx=d[i][0]+x;
       int yy=d[i][1]+y;
       if(maze[xx][yy]=='#'&&xx>=0&&yy>=0&&xx<n&&yy<m&&vis[xx][yy]==0)
        {
            dfs(xx,yy);
        }
   }
}
int main()
{
    cin>>n>>m;
        for(int i=0;i<n;i++)
        cin>>maze[i];
        for(int i=0;i<n;i++)
        for(int j=0;j<m;j++)
        {
            if(maze[i][j]=='#')
            {
                int flag=0;
                for(int i=0;i<4;i++)
                {
                    int c=0;
                    int a=d[i][0]+i;
                    int b=d[i][1]+j;
                    if(a>=0&&b>=0&&a<n&&b<m)
                    {
                        c++;
                        if(maze[a][b]=='.')
                        {
                            flag++;
                        }
                    }
                }
                if(c==flag)
                    {
                        cout<<"No"<<endl;
                        return 0;
                    }
            }
        }
        cout<<"Yes"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:20: error: 'c' was not declared in this scope
   48 |                 if(c==flag)
      |                    ^
Language: C++

#include <iostream>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin >> h >> w;
      |         ^~~
      |         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
      |                  ^~~
Language: C++

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


int main()
{
	int h, w;
	cin >> h >> w;
	vector<string> masu;
	for (int i = 0; i < h; ++i) {
		string s;
		cin >> s;
		masu.push_back(s);
	}
	bool ok = true;
	bool top;
	bool bot;
	bool l;
	bool r;
	string yn = "Yes";
	for (int i1 = 0; i1 < masu.size(); ++i1) {
		for (int i2 = 0; i2 < masu[i1].size; ++i2) {
			top = true;
			bot = true;
			l = true;
			r = true;

			if (masu[i1][i2] == '#') {
				if (i1 == 0)
					top = false;
				else if (masu[i1 - 1][i2] == '.')
					top = false;
				if (i2 == 0)
					l = false;
				else if (masu[i1][i2 - 1] == '.')
					l = false;
				if (i1 == masu.size() - 1)
					bot = false;
				else if (masu[i1 + 1][i2] == '.')
					bot = false;
				if (i2 == masu[i1].size() - 1)
					r = false;
				else if (masu[i1][i2 + 1] == '.')
					r = false;
				if (top || bot || l || r == false) {
					yn = "No";
				}
			}
		}
	}
	cout << yn;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:48: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   26 |                 for (int i2 = 0; i2 < masu[i1].size; ++i2) {
      |                                                    ()
Language: C++

#include<bits/stdc++.h>

using namespace std;

#define fi first
#define se second

const ll maxn = 1e3 + 10;
const int Move[4][2] = {-1,0,1,0,0,1,0,-1};
char mp[maxn][maxn];
int step[maxn][maxn];
bool vis[maxn][maxn];
int n,m;

bool check(int x,int y) {
    if(x < 0 || y < 0|| x >= n || y >= m || vis[x][y] || mp[x][y] == '#') return false;
    return true;
}

int BFS() {
    queue<pair<int ,int> > q;
    q.push(make_pair(0,0));
    step[0][0] = 1;
    vis[0][0] = true;
    while (!q.empty()) {
        pair<int ,int> t = q.front();
        q.pop();
        for(int i = 0;i < 4;i++) {
            int tox = t.fi + Move[i][0];
            int toy = t.se + Move[i][1];
            if(tox == n - 1 && toy == m - 1) return step[t.fi][t.se] + 1;
            if(check(tox,toy)) {
                vis[tox][toy] = true;
                step[tox][toy] = step[t.fi][t.se] + 1;
                q.push(make_pair(tox,toy));
            }
        }
    }
    return -1;
}


int main(){

    cin>>n>>m;
    int cnt = 0;
    for(int i = 0;i < n;i++)
        for(int j = 0;j < m;j++) {
            cin>>mp[i][j];
            if(mp[i][j] == '#') cnt++;
        }
    int res = BFS();
    if(res == -1) {
        cout<<"-1"<<endl;
    } else {
        cout<<n*m - res - cnt<<endl;
    }
    return 0;
}

Compiler output:
a.cc:8:7: error: 'll' does not name a type
    8 | const ll maxn = 1e3 + 10;
      |       ^~
a.cc:10:9: error: 'maxn' was not declared in this scope
   10 | char mp[maxn][maxn];
      |         ^~~~
a.cc:10:15: error: 'maxn' was not declared in this scope
   10 | char mp[maxn][maxn];
      |               ^~~~
a.cc:11:10: error: 'maxn' was not declared in this scope
   11 | int step[maxn][maxn];
      |          ^~~~
a.cc:11:16: error: 'maxn' was not declared in this scope
   11 | int step[maxn][maxn];
      |                ^~~~
a.cc:12:10: error: 'maxn' was not declared in this scope
   12 | bool vis[maxn][maxn];
      |          ^~~~
a.cc:12:16: error: 'maxn' was not declared in this scope
   12 | bool vis[maxn][maxn];
      |                ^~~~
a.cc: In function 'bool check(int, int)':
a.cc:16:45: error: 'vis' was not declared in this scope
   16 |     if(x < 0 || y < 0|| x >= n || y >= m || vis[x][y] || mp[x][y] == '#') return false;
      |                                             ^~~
a.cc:16:58: error: 'mp' was not declared in this scope; did you mean 'm'?
   16 |     if(x < 0 || y < 0|| x >= n || y >= m || vis[x][y] || mp[x][y] == '#') return false;
      |                                                          ^~
      |                                                          m
a.cc: In function 'int BFS()':
a.cc:23:5: error: 'step' was not declared in this scope; did you mean 'strsep'?
   23 |     step[0][0] = 1;
      |     ^~~~
      |     strsep
a.cc:24:5: error: 'vis' was not declared in this scope
   24 |     vis[0][0] = true;
      |     ^~~
a.cc: In function 'int main()':
a.cc:49:18: error: 'mp' was not declared in this scope; did you mean 'm'?
   49 |             cin>>mp[i][j];
      |                  ^~
      |                  m
Language: C++

#include<bits/stdc++.h>

using namespace std;

#define fi first
#define se second

const long long maxn = 1e3 + 10;
const int Move[4][2] = {-1,0,1,0,0,1,0,-1};
char mp[maxn][maxn];
int step[maxn][maxn];
bool vis[maxn][maxn];
int n,m;

bool check(int x,int y) {
    if(x < 0 || y < 0|| x >= n || y >= m || vis[x][y] || mp[x][y] == '#') return false;
    return true;
}

int BFS() {
    queue<pair<int ,int> > q;
    q.push(make_pair(0,0));
    step[0][0] = 1;
    vis[0][0] = true;
    while (!q.empty()) {
        pair<int ,int> t = q.front();
        q.pop();
        for(int i = 0;i < 4;i++) {
            int tox = t.fi + Move[i][0];
            int toy = t.se + Move[i][1];
            if(tox == n - 1 && toy == m - 1) return step[t.fi][t.se] + 1;
            if(check(tox,toy)) {
                vis[tox][toy] = true;
                step[tox][toy] = step[t.fi][t.se] + 1;
                q.push(make_pair(tox,toy));
            }
        }
    }
    return -1;
}


int main(){
    init();
    cin>>n>>m;
    int cnt = 0;
    for(int i = 0;i < n;i++)
        for(int j = 0;j < m;j++) {
            cin>>mp[i][j];
            if(mp[i][j] == '#') cnt++;
        }
    int res = BFS();
    if(res == -1) {
        cout<<"-1"<<endl;
    } else {
        cout<<n*m - res - cnt<<endl;
    }
    return 0;
}

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

#include <stdio.h>
int main(){
    int H,W=,count=0;
    scanf("%d %d",&H,&W);
    char da[H][W+1];
    puts("ok");
    for(int n=0;n<H;n++){
        scanf("%s",&da[n][0]);
    }
    if(da[0][0]=='#' &&
    
    
    for(int m=1;m<H-1;m++){
        for(int n=1;n<W-1;n++){
            if(da[m][n]=='#' && da[m][n+1]=='.' && da[m][n-1]=='.' && da[m+1][n]=='.' && da[m-1][n]=='.' ){
                puts("Yes");
                break;
            }
        }
    }
    return 0;
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:13: error: expected primary-expression before ',' token
    3 |     int H,W=,count=0;
      |             ^
a.cc:13:5: error: expected primary-expression before 'for'
   13 |     for(int m=1;m<H-1;m++){
      |     ^~~
a.cc:10:24: error: expected ')' before 'for'
   10 |     if(da[0][0]=='#' &&
      |       ~                ^
      |                        )
......
   13 |     for(int m=1;m<H-1;m++){
      |     ~~~                 
a.cc:13:17: error: 'm' was not declared in this scope
   13 |     for(int m=1;m<H-1;m++){
      |                 ^
Language: C++

#include <iostream>
using namespace std;
int main(){
string a, at, b , c;
cin >> a >> at >>b >> c;
if (b[0] == "#"&&b[1] == "."){
cout << "No" << endl;
}else{
cout << "Yes" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 | if (b[0] == "#"&&b[1] == "."){
a.cc:6:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 | if (b[0] == "#"&&b[1] == "."){
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int h,w,i,j,flag=0;
	char map[51[51];
	cin>>h>>w;
	for(j=0;j<h;j++)
	for(i=0;i<w;i++)
	{
		cin>>map[j][i];
	}
	for(j=0;j<h;j++)
	for(i=0;i<w;i++)	
	{
		if(map[j][i]=='#')
		{
		flag=0;
		if(i!=0)
		{
			if(map[j][i-1]=='#')
			{
				flag=1;
				continue;
			}	
		}
		if(i!=w-1)
		{
			if(map[j][i+1]=='#')
			{
				flag=1;
				continue;
			}	
		}
		if(j!=0)
		{
			if(map[j-1][i]=='#')
			{
				flag=1;
				continue;
			}	
		}
		if(j!=h-1)
		{
			if(map[j+1][i]=='#')
			{
				flag=1;
				continue;
			}	
		}
		if(flag==0)
		{
			break;
		}
	    }
	}
	if(flag)
	cout<<"Yes";
	else
	cout<<"No";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: invalid types 'int[int]' for array subscript
    6 |         char map[51[51];
      |                    ^
a.cc:6:24: error: expected ']' before ';' token
    6 |         char map[51[51];
      |                        ^
      |                        ]
a.cc:11:22: error: 'map' was not declared in this scope
   11 |                 cin>>map[j][i];
      |                      ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include<iostream>
  +++ |+#include <map>
    2 | using namespace std;
a.cc:16:20: error: 'map' was not declared in this scope
   16 |                 if(map[j][i]=='#')
      |                    ^~~
a.cc:16:20: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
Language: C++

#include <iostream>
using namespace std;
int main(){
string a,, at, b , c;
cin >> a >> at >>b >> c;
if (b == "#" && c == "."){
cout << "No" << endl;
}else{
cout << "Yes" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: expected unqualified-id before ',' token
    4 | string a,, at, b , c;
      |          ^
Language: C++

#include <iostream>
using namespace std;
int main(){
string a,, at b , c;
cin >> a >> at >>b >> c;
if (b == "#" && c == "."){
cout << "No" << endl;
}else{
cout << "Yes" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: expected unqualified-id before ',' token
    4 | string a,, at b , c;
      |          ^
a.cc:4:15: error: expected initializer before 'b'
    4 | string a,, at b , c;
      |               ^
a.cc:5:13: error: 'at' was not declared in this scope; did you mean 'a'?
    5 | cin >> a >> at >>b >> c;
      |             ^~
      |             a
a.cc:5:18: error: 'b' was not declared in this scope
    5 | cin >> a >> at >>b >> c;
      |                  ^
a.cc:5:23: error: 'c' was not declared in this scope
    5 | cin >> a >> at >>b >> c;
      |                       ^
Language: C++

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

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

#include <stdio.h>

int main(){
	int h,w;
	char color[52][52];
	scanf("%d %d",&h,&w);
	for(int i=0;i<h+2;i++)
	{
		for(int j=0;j<w+2;i++)
		{
			if(i==0||j==0||i==h+1||j==w+1)
			{
				color[i][j]='.';
			}else
			{
				scanf("%c",&color[i][j]);
			}
				
				if(i>1 && j != 1 && j != w+1color[i][j]=='.' && color[i-1][j]=='#' && color[i-2][j]=='.' && color[i-1][j-1]=='.' && color[i-1][j+1]=='.')
				{
					printf("No");
					return 0;
				}
			
		}
	}
	printf("Yes");
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:60: error: invalid suffix "color" on integer constant
   19 |                                 if(i>1 && j != 1 && j != w+1color[i][j]=='.' && color[i-1][j]=='#' && color[i-2][j]=='.' && color[i-1][j-1]=='.' && color[i-1][j+1]=='.')
      |                                                            ^~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include<math.h>
using namespace std;
int main(){
	int H, W;
	int res=0;
	int fail=0;
	string S[100000];
	cin >> H >> W;
	for(int n=1; n<=H; n++){
		for(int i=1; i<=W; i++)
		cin >> S[n][i];
	}
	for(int n=1; n<=H; n++){
		for(int i=1; i<=W; i++){
		if(S[n][i]=='#'){
			if(S[n+1][i]=='#' || S[n-1][i]=='#' || S[n][i+1]=='#' || S[n][i-1]=='#'){
				res=1;
			}else{
				fail=1;
				break;
			}
		}
		if(fail==1) break;
	}

	if(H==1&&W==1){
cout << "Yes"<<endl;
	}
	else if(fail==1){
		cout << "No"<<endl;
	}else 	{
cout << "Yes"<<endl;
	}
	return 0;
}

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

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

int main()
{
    int a,b;
    scanf("%d%d",&a,&b);
    getchar();
    char c;
    char s[51][51];
    memset(s,0,sizeof(s));
    for(int i=0;i<a;i++){
        gets(s[i]);
    }
    bool flag;
     for(int i=0;i<a;i++)
    {
        for(int j=0;j<b;j++)
        {

            if(s[i][j]=='#')
            {
                flag=false;
                if(s[i-1][j]=='#'||s[i+1][j]=='#'||s[i][j-1]=='#'||s[i][j+1]=='#')
                    flag=true;
                else
                    break;
            }
        }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   16 |         gets(s[i]);
      |         ^~~~
      |         getw
Language: C++

int main(void){
int H,W,i,j;
char hoge[50];
bool array[52][52]={0};
scanf("%d",&H);
scanf("%d",&W);

for(i=1;i<H+2;i++){
scanf("%s",&hoge);
for(j=1;j<W+2;j++){
if(hoge[j] == '#')array[i][j]=1;
}
}

for(i=1;i<H+2;i++){
for(j=1;j<W+2;j++){
if(array[i][j]){
if(array[i][j-1]
 ||array[i-1][j] || array[i+1][j]
 ||array[i][j+1]){
}else{
printf("No");
return 0;
}
}
}
}
printf("Yes");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'scanf' was not declared in this scope
    5 | scanf("%d",&H);
      | ^~~~~
a.cc:22:1: error: 'printf' was not declared in this scope
   22 | printf("No");
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void){
a.cc:28:1: error: 'printf' was not declared in this scope
   28 | printf("Yes");
      | ^~~~~~
a.cc:28:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: Java

public class Main {

	public static boolean aufg() {
		Scanner sc = new Scanner(System.in);
		int h = sc.nextInt();
		int w = sc.nextInt();
		char[][] grid = new char[h][w];
		
		for(int i = 0; i < h; i++) {
			String line = sc.next();

			char[] thisline=line.toCharArray();
			for(int j = 0; j<thisline.length; j++) {
				grid[i][j]=thisline[j];
			}
		}
		sc.close();
		

		
		for(int i = 0; i <h; i++) {
			for(int j = 0; j <w; j++) {
				char pat = grid[i][j];
				if(pat == '#') {
				boolean left = false, right = false,
						top = false, bottom = false;
				
				// check left
				if(i>0)if(grid[i-1][j]==pat)left = true;;
				// check right
				if(i<w-1)if(grid[i+1][j]==pat)right = true;;
				//check top
				if(j>0)if(grid[i][j-1]==pat)top = true;
				//check bottom
				if(j<h-1)if(grid[i][j+1]==pat)bottom = true;;
				
				if(!(top || bottom || left || right) && w*h!=1)return false;
				}
			}
			
			
		}
		return true;
		
	
	}
	
	public static void main(String[] args) {
		boolean possible = aufg();
		if(possible)System.out.println("Yes");
		else System.out.println("No");
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |                 gets(str[i]);
      |                 ^~~~
      |                 getw
Language: C++

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


Compiler output:
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C

#include<stdio.h>

int main(void){

int i,j,w,h,x = 1,flag = 0;
char b[52][52];

scanf("%d %d",&h,&w);

for(j = 1; j <= h; j++){
 for(i = 1; i <= w; i++){
scanf("%s",&b[i][j]);
 }
}

for(j = 1; j <= w; j++){
 for(i = 1; i <= h; i++){
if(b[i][j] == '#'){
if(b[i-1][j] == '#' || b[i+1][j] == '#' || b[i][j-1] == '#' || b[i][j+1] == '#') {flag = 1;}
else {x = 0;}
}
}
}

if(x == 1 && flag = 1) printf("Yes");
else printf("No");

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:19: error: lvalue required as left operand of assignment
   25 | if(x == 1 && flag = 1) printf("Yes");
      |                   ^
Language: C++

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

    int h, w, i, j;

    int sw = 0;

    cin >> h >> w;

    char s[h + 1][w + 1];



    for( i = 1 ; i <= h ; i = i + 1 ){

         for( j = 1 ; j <= w ; j = j + 1 ){

              cin >> s[i][j];

              if( s[i][j] == '#') sw = 1;

              }

         }


    if( sw != )

    for( i = 1 ; i <= h ; i = i + 1 ){

         for( j = 1 ; j <= w ; j = j + 1 ){

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

                  if( s[i][j + 1] == '#' || s[i + 1][j] == '#' || s[i][j - 1] == '#' || s[i - 1][j] == '#' ) i = i;

                  else{

                         cout << "No" << endl;

                         return 0;

                         }

                  }

              }

         }

    if(  )

    cout << "Yes" << endl;


    return 0;

    }

Compiler output:
a.cc: In function 'int main()':
a.cc:31:15: error: expected primary-expression before ')' token
   31 |     if( sw != )
      |               ^
a.cc:55:10: error: expected primary-expression before ')' token
   55 |     if(  )
      |          ^
Language: C++

#include<iostream>
#include <algorithm>
#include <math.h>
using namespace std;
int main()
{
	int h,w;
	bool ans = true;
	int n, m;
	cin >> h >>w;
	string s[h + 2][w + 2];
	string t[h];
	for (n = 0; n < h+2; n++){
		for (m = 0; m < w+2; m++){
			s[n][m] = ".";
		}
	}
	for (n=0; n < h; n++){
			cin >> t[n];
	}
	for (n = 1; n < h + 1; n++){
		for (m = 1; m < w + 1; m++){
			s[n][m] = t[n-1].substr(m,1);
		}
	}
	for (n = 1; n < h+1; n++){
		for (m = 1; m < w+1; m++){
			if (s[n][m] == "#" && s[n - 1][m] == "." && s[n][m - 1] == "."&& s[n+1][m] == "." && s[n][m + 1] == "."){
				ans = false;
			}
		}
	}
	if (ans||(h==1&&w==1){
		cout << "Yes" << endl;
	}
	else{
		cout << "No" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:30: error: expected ';' before '{' token
   33 |         if (ans||(h==1&&w==1){
      |                              ^
      |                              ;
a.cc:36:9: error: expected primary-expression before 'else'
   36 |         else{
      |         ^~~~
a.cc:35:10: error: expected ')' before 'else'
   35 |         }
      |          ^
      |          )
   36 |         else{
      |         ~~~~
a.cc:33:12: note: to match this '('
   33 |         if (ans||(h==1&&w==1){
      |            ^
Language: C

#include<bits/stdc++.h>
#define pb push_back
#define ppb pop_back
#define mer make_pair
#define fi first
#define se second
using namespace std;

typedef long long ll;
ll n,m;
char ch[555][555];
ll w[5][3]={{0,0,0},{0,0,1},{0,0,-1},{0,1,0},{0,-1,0}};

bool ok(ll a,ll b){
	if(a<=n&&a>0&&b<=m&&b>0)
		return true;
}

ll dfs(ll x,ll y){
	if(ch[x][y]=='.'||!ok(x,y))
		return 0;
	ch[x][y]='.';
//	cout<<x<<' '<<y<<endl;
	ll sum=1;
	for(ll i=1;i<=4;i++){
		ll xx=x+w[i][1];
		ll yy=y+w[i][2];
		sum+=dfs(xx,yy);
	}
	return sum;
}

int main(){
	//my new name is Veex
	//clock_t start1=clock();
	cin>>n>>m;
	for(ll i=1;i<=n;i++){
		string cs;
		cin>>cs;
//		cout<<cs<<endl;
		for(ll j=0;j<m;j++){
			ch[i][j+1]=cs[j];
		}
	}
	//for(int i=1;i<=n;i++){
	//	for(int j=1;j<=m;j++)
	//		cout<<ch[i][j];
	//	cout<<endl;
	//}
	for(ll i=1;i<=n;i++)
		for(ll j=1;j<=m;j++){
			if(ch[i][j]=='#'){
				if(dfs(i,j)==1){
					cout<<"No";
					return 0;
				}
			}
		}
	cout<<"Yes";
	//((double)(clock()-start1)/CLOCKS_PER_SEC)*1000;
	return 0;
}
/*
9 37
###########......#...#.........#.....
.....#..........##...#....###########
.....#.........##..#####..#.........#
.....#.......###.....#....#.#######.#
###########..#.#...#####.......#.....
.....#.........#......#.....#######..
.....#.........#...#.##........#.....
.....#.........#...##.........##.....
###########....#....##.........#.....

*/

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

#include<iostream>
#include<algorithm>
#include<string> 
#include<map>
#include<set>
#include<vector>
#include<string.h>
#include<math.h>
#include<stdio.h>
#include<queue>
#include<utility>
#include<cstdio>
#include<cstring>
#define fo(i,w,n) for(int i=(int) w;i<(int) n;i++)
#define qui queue<int>
#define vit vector<int>
#define ll long long
#define pb push_back
using namespace std;
char a[51][51];int n,h;
int nn(int x){
	if(x<0)return x+1;
	if(x>=h)return x-1;
	return x;
}
int hh(int v){
	if(v<0)return x+1;
	if(v>=h)return x-1;
	return x;
}
int main()
{cin>>n>>h;
fo(i,0,n) fo(j,0,h)cin>>a[i][j];
fo(i,0,n) fo(j,0,h)if(a[i][j]=='#')
if(a[nn(i+1)][j]!='#'&&a[nn(i-1)][j]!='#'&&a[i][hh(j+1)]!='#'&&a[i][hh(j-1)]!='#')cout<<"NO",return 0;
cout<<"YES";
system("pause");
return 0;
}

Compiler output:
a.cc: In function 'int hh(int)':
a.cc:27:23: error: 'x' was not declared in this scope
   27 |         if(v<0)return x+1;
      |                       ^
a.cc:28:24: error: 'x' was not declared in this scope
   28 |         if(v>=h)return x-1;
      |                        ^
a.cc:29:16: error: 'x' was not declared in this scope
   29 |         return x;
      |                ^
a.cc: In function 'int main()':
a.cc:35:94: error: expected primary-expression before 'return'
   35 | if(a[nn(i+1)][j]!='#'&&a[nn(i-1)][j]!='#'&&a[i][hh(j+1)]!='#'&&a[i][hh(j-1)]!='#')cout<<"NO",return 0;
      |                                                                                              ^~~~~~
Language: Java

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Iterator;
import java.util.Collections;
import java.util.Comparator;
import java.util.Random;
import java.util.Map;
import java.util.HashMap;

class Main{
        public static void main(String args[]){
                Scanner sc = new Scanner(System.in);
                int H = sc.nextInt();
                int W = sc.nextInt();
                String[] grid = new String[H+2]();
                for(int i=1; i<=H; i++){
                        grid[i] = sc.next();
                        grid[i] = "." + grid[i] + ".";
                }
                for(int j=0; j<=W+1; j++){
                        grid[0] += ".";
                        grid[H+1] += ".";
                }

                boolean ch = true;

                for(int i=1; i<=H; i++){
                        for(int j=1; j<=W; j++){
                                if(grid[i].charAt(j) == '#'){
                                        if( !( grid[i-1].charAt(j-1) == '#' && grid[i+1].charAt(j-1) == '#' 
                                        && grid[i-1].charAt(j+1) == '#' && grid[i+1].charAt(j+1) == '#') ){
                                        ch=false;
                                        break;
                                        }
                                }

                        }
                        if(!ch)break;
                }

                if(ch){
                        System.out.println("Yes");
                }else{
                        System.out.println("No");
                }
        }
}



Compiler output:
Main.java:17: error: ';' expected
                String[] grid = new String[H+2]();
                                               ^
1 error
Language: C++

#include<string>
#include<string.h>
#include<map>
#include<set>
#include<vector>
#include<stdio.h>
#include<math.h>
#include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
int h,w;
bool a[155][155];
char c[155][155];
void dfs(int x,int y){
  a[x][y]=true;
  for(int i=0;i<h;i++)
    for(int j=0;j<w;j++){
      if((x==i && || y==j) && a[i][j]==false && c[i][j]=='#')
        dfs(i,j);
}}
int main()
{
  int ax=100000,by=100000;
  cin>>h>>w;
  for(int i=0;i<h;i++)
    for(int j=0;j<w;j++){
      cin>>c[i][j];
      if(c[i][j]=='.')
        a[i][j]=true;
      else
       {ax=i;
        by=j;}
  }
  if(ax==100000 && by==100000)
    {cout<<"Yes";
     system("pause");
     exit(0);}
  dfs(ax,by);
  for(int i=0;i<h;i++)
    for(int j=0;j<w;j++)
    {if(a[i][j]==false)
     {cout<<"No";
      system("pause");
      return 0;}}
cout<<"Yes";
system("pause");
return 0;
}

Compiler output:
a.cc: In function 'void dfs(int, int)':
a.cc:19:19: error: expected primary-expression before '||' token
   19 |       if((x==i && || y==j) && a[i][j]==false && c[i][j]=='#')
      |                   ^~
Language: C++

#include <iostream>
using namespace std;

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

  bool a = true;

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |         if (m[i + 1] != '#' && m[i + 1] != '#') a = false;
      |             ~~~~~~~~~^~~~~~
a.cc:19:41: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |         if (m[i + 1] != '#' && m[i + 1] != '#') a = false;
      |                                ~~~~~~~~~^~~~~~
Language: C++

#include<iostream>
using namespace std;

int s[53][53];
int next[4][2]={{1,0},{-1,0},{0,1},{0,-1}};

int  dfs(int a,int b){
	for(int i=0;i<4;++i){	
		a=a+next[i][0];
        b=b+next[i][1];
		if(s[a][b]==1){
			return 0;
		}	
	}	
	return 1;
}
int main()
{
	int m,n;
	int flag=0;
	cin>>m>>n;
	for(int i=1;i<=m;++i){
		for(int j=1;j<=n;++j){
			char a;
			cin>>a;
			if(a=='#')
				s[i][j]=1;
		}
	}
	for(int i=1;i<=m;++i){
		for(int j=1;j<=n;++j){
			if(s[i][j]==1&&dfs(i,j)){
				flag=1;
				break;
			}
		}
	}
	if(flag==0)
		cout<<"Yes"<<endl;
	else
		cout<<"No"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int dfs(int, int)':
a.cc:9:21: error: reference to 'next' is ambiguous
    9 |                 a=a+next[i][0];
      |                     ^~~~
In file included from /usr/include/c++/14/string:47,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
a.cc:5:5: note:                 'int next [4][2]'
    5 | int next[4][2]={{1,0},{-1,0},{0,1},{0,-1}};
      |     ^~~~
a.cc:10:13: error: reference to 'next' is ambiguous
   10 |         b=b+next[i][1];
      |             ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)'
  232 |     next(_InputIterator __x, typename
      |     ^~~~
a.cc:5:5: note:                 'int next [4][2]'
    5 | int next[4][2]={{1,0},{-1,0},{0,1},{0,-1}};
      |     ^~~~
Language: C++

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

int main(){
  int h,w;
  int  han=0;
  cin >> h >> w; char cam[h][w];
  for(int i=0;i<h;i++) for(int j=0;j<w;j++) cin >> cam[i][j];
  if(h==1&&w==1) {
    if(cam[i][j]=='#') cout << "Yes" << endl;
    else cout << "No" << endl;
    exit(0);
  }
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(cam[i][j]=='#'){
        if(i==0&&j==0) if(cam[i+1][j]!='#'&&cam[i][j+1]!='#') han=1;
        else if(i==h-1&&j==w-1) if(cam[i-1][j]!='#'&&cam[i][j-1]!='#') han=1;
        else if(j==0) if(cam[i+1][j]!='#'&&cam[i][j+1]!='#'&&cam[i-1][j]!='#') han=1;
        else if(i==0) if(cam[i][j-1]!='#'&&cam[i+1][j]!='#'&&cam[i][j+1]!='#') han=1;
        else if(j==w-1) if(cam[i-1][j]!='#'&&cam[i][j-1]!='#'&&cam[i+1][j]!='#') han=1;
        else if(i==h-1) if(cam[i-1][j]!='#'&&cam[i][j-1]!='#'&&cam[i][j+1]!='#') han=1;
        else if(cam[i-1][j]!='#'&&cam[i+1][j]!='#'&&cam[i][j-1]!='#'&&cam[i][j+1]!='#') han=1;
      }
    }
    if(han==1) {
      cout << "No" << endl;
      exit(0);
    }
  }
  cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'i' was not declared in this scope
   10 |     if(cam[i][j]=='#') cout << "Yes" << endl;
      |            ^
a.cc:10:15: error: 'j' was not declared in this scope
   10 |     if(cam[i][j]=='#') cout << "Yes" << endl;
      |               ^
Language: C++

#include<iostream>
using namespace std;
int main(){
        int H,W,N;
        N=0;
        cin >> H >> W ;
        char s[H][W];
        int a[H][W];
        for(int i=0;i<H;i++){
                for(int j=0;j<W;j++){
                        a[i][j]=0;
                }
        }
        a[H][W]=1;
        for(int i=0;i<H;i++){
                for(int j=0;j<W;j++){
                        cin>>s[i][j];
                }
        }
        for(int i=0;i<W-1;i++){
                if(s[H][i]=='#'){
                                if(s[H][i+1]=='#'){
                                        a[H][i]=1;
                                        a[H][i+1}=1;
                        }
        }
        for(int i=0;i<H-1;i++){
                if(s[i][W]=='#'){
                                if(s[i+1][W]=='#'){
                                        a[i][W]=1;
                                        a[i+1][W]=1;
                                }
                        }
        }
        for(int i=0;i<H-1;i++){
                for(int j=0;j<W-1;j++){
                        if(s[i][j]=='#'){
                                if(s[i][j+1]=='#'){
                                        a[i][j]=1;
                                        a[i][j+1]=1;
                                }
                                if(s[i+1][j]=='#'){
                                        a[i][j]=1;
                                        a[i+1][j]=1;
                                }
                        }
                }
        }
        for(int i=0;i<H;i++){
                for(int j=0;j<W;j++){

                       if(a[i][j]==0){
                                N=1;
                                break;
                        }
                        if(i==H-1&&j==W-1)cout<<"Yes"<<endl;
                }
        }
        if(N==1)cout<<"No"<<endl;
        return 0;
}

 

Compiler output:
a.cc: In function 'int main()':
a.cc:24:49: error: expected ']' before '}' token
   24 |                                         a[H][i+1}=1;
      |                                                 ^
      |                                                 ]
a.cc:24:49: error: expected ';' before '}' token
   24 |                                         a[H][i+1}=1;
      |                                                 ^
      |                                                 ;
a.cc:24:50: error: expected primary-expression before '=' token
   24 |                                         a[H][i+1}=1;
      |                                                  ^