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

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

int main(){
  int h, w;
  cin >> h >> w;
  vector<vector<char>> data(h,vector<char>(w));
  vector<int> dx={-1,0,1,0};
  vector<int> dy={0,1,0,-1};
  bool judge = true;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(data.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);
          if(x>=0&&x<h&&y>=0&&y<w&&data.at(x).at(y)=='#'){cnt++}
        }
        if(cnt==0){judge=false;}
      }
    }
  }
  if(judge){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:64: error: expected ';' before '}' token
   18 |           if(x>=0&&x<h&&y>=0&&y<w&&data.at(x).at(y)=='#'){cnt++}
      |                                                                ^
      |                                                                ;
Language: C++

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

int main(){
  int h, w;
  cin >> h >> w;
  vector<vector<char>> data(h,vector<char>(w));
  vector<int> dx={-1,0,1,0};
  vecotr<int> dy={0,1,0,-1};
  bool judge = true;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(data.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);
          if(x>=0&&x<h&&y>=0&&y<w&&data.at(x).at(y)=='#'){cnt++}
        }
        if(cnt==0){judge=false;}
      }
    }
  }
  if(judge){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'vecotr' was not declared in this scope
    9 |   vecotr<int> dy={0,1,0,-1};
      |   ^~~~~~
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   vecotr<int> dy={0,1,0,-1};
      |          ^~~
a.cc:17:19: error: 'dy' was not declared in this scope; did you mean 'y'?
   17 |           int y=j+dy.at(k);
      |                   ^~
      |                   y
a.cc:18:64: error: expected ';' before '}' token
   18 |           if(x>=0&&x<h&&y>=0&&y<w&&data.at(x).at(y)=='#'){cnt++}
      |                                                                ^
      |                                                                ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
// 上下左右用

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

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

  for(int i = 0; i < H; i++){
    for(int h = 0; j< W; j++){
      if(s[i][j] == '#'){
        int cnt = 0;
        for(int x = 0; x < 4; x++){
          if(s[i+dx[x]][j+dy[x]]== '#') cnt++;
        }
        if(cnt == 0){
          cout << "No" << endl;
        }
      }
    }
  }
  cout << "Yes" << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:20: error: 'j' was not declared in this scope
   19 |     for(int h = 0; j< W; j++){
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
// 上下左右用

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

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

  for(int i = 0; i < H; i++){
    for(int h = 0; J < W; j++){
      if(s[i][j] == '#'){
        int cnt = 0;
        for(int x = 0; x < 4; x++){
          if(s[i+dx[x]][j+dy[x]]== '#') cnt++;
        }
        if(cnt == 0){
          cout << "No" << endl;
        }
      }
    }
  }
  cout << "Yes" << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'vcector' was not declared in this scope
   11 |   vector<vcector<char>> s(H, vector<char>(W));
      |          ^~~~~~~
a.cc:11:22: error: template argument 1 is invalid
   11 |   vector<vcector<char>> s(H, vector<char>(W));
      |                      ^~
a.cc:11:22: error: template argument 2 is invalid
a.cc:11:45: error: expression list treated as compound expression in initializer [-fpermissive]
   11 |   vector<vcector<char>> s(H, vector<char>(W));
      |                                             ^
a.cc:11:30: error: cannot convert 'std::vector<char>' to 'int' in initialization
   11 |   vector<vcector<char>> s(H, vector<char>(W));
      |                              ^~~~~~~~~~~~~~~
      |                              |
      |                              std::vector<char>
a.cc:14:15: error: invalid types 'int[int]' for array subscript
   14 |       cin >> s[i][j];
      |               ^
a.cc:19:20: error: 'J' was not declared in this scope
   19 |     for(int h = 0; J < W; j++){
      |                    ^
a.cc:19:27: error: 'j' was not declared in this scope
   19 |     for(int h = 0; J < W; j++){
      |                           ^
a.cc:20:11: error: invalid types 'int[int]' for array subscript
   20 |       if(s[i][j] == '#'){
      |           ^
a.cc:23:15: error: invalid types 'int[int]' for array subscript
   23 |           if(s[i+dx[x]][j+dy[x]]== '#') cnt++;
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
// 上下左右用

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

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

  for(int i = 0; i < H; i++){
    for(int h = 0; J < W; j++){
      if(s[i][j] == '#'){
        int cnt = 0;
        for(int x = 0; x < 4; x++){
          if(s[i+dx[x]][j+dy[x]]== '#') cnt++;
        }
        if(cnt == 0){
          cout << "No" << endl;
        }
      }
    }
  }
  cout << "Yes" << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'vcector' was not declared in this scope
   11 |   vector<vcector<char>> s(H);
      |          ^~~~~~~
a.cc:11:22: error: template argument 1 is invalid
   11 |   vector<vcector<char>> s(H);
      |                      ^~
a.cc:11:22: error: template argument 2 is invalid
a.cc:14:15: error: invalid types 'int[int]' for array subscript
   14 |       cin >> s[i][j];
      |               ^
a.cc:19:20: error: 'J' was not declared in this scope
   19 |     for(int h = 0; J < W; j++){
      |                    ^
a.cc:19:27: error: 'j' was not declared in this scope
   19 |     for(int h = 0; J < W; j++){
      |                           ^
a.cc:20:11: error: invalid types 'int[int]' for array subscript
   20 |       if(s[i][j] == '#'){
      |           ^
a.cc:23:15: error: invalid types 'int[int]' for array subscript
   23 |           if(s[i+dx[x]][j+dy[x]]== '#') cnt++;
      |               ^
Language: C++

    /**   Created by: Marcos Portales
          Codeforces User: marcosportales
          Country: Cuba
                         **/
#include<bits/stdc++.h>
using namespace std;
/// Macros:
#define int long long
#define f first
#define s second
#define db(x) cerr << #x << ": " << (x) << '\n';
#define pb push_back
#define lb lower_bound
#define up upper_bound
#define all(x) x.begin() , x.end()
#define rall(x) x.rbegin() , x.rend()
#define enl '\n'
#define vi vector<int>
#define sz size
#define rep(i,n) for(int i=0;i<(n);i++)
#define rep2(i,n) for(int i=1;i<=(n);i++)
typedef pair<int,int> ii;
typedef long double ld;
typedef unsigned long long ull;
/// Constraints:
const int maxn = 2*1e5+1;
const int mod = 1000000009;
const ld eps = 1e-9;
const int inf = ((1ll<<31ll)-1ll);
const int INF = 10000000000000000ll;
const ld pi = acos(-1);
/// Prime Numbers:
// 2, 173, 179, 181, 197, 311, 331, 737, 1009, 2011, 2027, 3079, 4001, 10037, 10079, 20011, 20089;
// 100003, 100019, 100043, 200003, 200017, 1000003, 1000033, 1000037, 1000081;
// 2000003, 2000029, 2000039, 1000000007, 1000000021, 2000000099;
/// Functions:
#define lg2(x) 31 - __builtin_clz(x)
#define lgx(x,b) ( log(x) / log(b) )
/// Red-Black Tree Template ---------------------------------
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//typedef tree < long long ,  null_type ,  less<long long> ,  rb_tree_tag ,  tree_order_statistics_node_update > ordered_set;
/// Quick Pow------------------------------------------------
int qpow(int b,int e){
    if( !e ) return 1;
    if( e & 1 ) return qpow(b,e-1) * b;
    int pwur = qpow(b,e>>1);
    return pwur * pwur;
}
int modinv(int x){
    return qpow(x,mod-2);
}
/// Criba de Eratostenes ------------------------------------
const int pr=10000;
map<int,int>isp;
void criba(){
    for(int i=0;i<=pr;i++)isp[i]=i;
    isp[0]=isp[1]=-1;
    for(int i=2;i*i<=pr;i++){
        if(isp[i]==i){
        for(int j=i+i;j<=pr;j+=i)
            isp[j]=i;
        }
    }
}
/// My Code -------------------------------------------------
/*
int dx[]={1,-1,0,0},dy[]={0,0,1,-1};
bool vis[55][55];
char v[55][55];
void dfs(int x,int y){
    int nx,ny;
    vis[x][y]=true;
    rep(i,4){
        nx=x+dx[i];
        ny=y+dy[i];
        if(!vis[nx][ny]&&v[nx][ny]=='#')dfs(nx,ny);
    }
}
*/
int32_t main(){
    ios_base::sync_with_stdio(0); cin.tie(0);
    cout.setf(ios::fixed); cout.precision(0);
    srand(time(NULL));

    ///freopen("a.in","r",stdin);
    ///freopen("a.out","w",stdout);
    ///criba();

    int n,m;
    cin>>n>>m;
    rep(i,n)rep(j,m)cin>>v[i][j];

    bool fl=true;
    rep(i,n-1)rep(j,m-1){
        if(v[i][j]=='#'){
            if(v[i+1][j]=='.'&&v[i-1][j]=='.'&&v[i][j+1]=='.'&&v[i][j-1]=='.')fl=0;
        }
    }

    cout<<((fl)?"Yes":"No")<<enl;

    return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:93:26: error: 'v' was not declared in this scope
   93 |     rep(i,n)rep(j,m)cin>>v[i][j];
      |                          ^
a.cc:97:12: error: 'v' was not declared in this scope
   97 |         if(v[i][j]=='#'){
      |            ^
Language: C++

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

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

int h,w;
  cin >> h >> w;
string d[50];
  
  for(int i=0;i<n;i++) cin >> d[i];
int num=0;  
for(int i=0;i<h;i++){
  for(int j=0;j<w;j++){
  if(d[i][j]=='.')continue;
   for(int k=0;k<4;k++){
    int y=i+dy[k];
    int x=j+dx[k];
   if(y<0 | y>=h)continue;
   if(x<0 | x>=w)continue;
   if(d[y][x])num++;  
   }    
  }
}  
if(num==0)cout << "No" << endl;  
else cout << "Yes" << endl;  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'n' was not declared in this scope
   12 |   for(int i=0;i<n;i++) cin >> d[i];
      |                 ^
Language: C++

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

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

int h,w;
  cin >> h >> w;
string d[50];
  
  for(int i=0;i<n;i++) cin >> d[i];
int num=0;  
for(int i=0;i<h;i++){
  for(int j=0;j<w;j++){
  if(d[i][j]=='.')continue;
   for(int k=0;k<n;k++){
    int y=i+dy[k];
    int x=j+dx[k];
   if(y<0 | y>=h)continue;
   if(x<0 | x>=w)continue;
   if(d[y][x])num++;  
   }    
  }
}  
if(num==0)cout << "No" << endl;  
else cout << "Yes" << endl;  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'n' was not declared in this scope
   12 |   for(int i=0;i<n;i++) cin >> d[i];
      |                 ^
a.cc:17:18: error: 'n' was not declared in this scope
   17 |    for(int k=0;k<n;k++){
      |                  ^
Language: C++

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

int main(){
  int h,w;
  cin >>h>>w;
  string board[50];
  for (int i=0;i<h;i++) cin >> board[i];
  bool seen=true;
  int ni[4]={1,0,0,-1};
  int nj[4]={0,-1,1,0};   
  bool s=false;
  int p=0;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){

      if(board[i][j]=='.') {
        cout <<"Yes,continue"<<endl;
        continue;
      }
      for (int m=0;m<4;m++){
        int x=i+ni[i];
        int y=j+nj[j];
        if(x<0 or y>=w) {
          cout << board[continue;
        if(x>=h or y<0) continue;
        
        if(board[x][y]=='#') p++;
      }
      if(p==0){
        cout << "No" <<endl;
        seen=false;
        s=true;
        cout << "Hey" <<endl;
        break;
      }
    }
    cout << "now,break" <<endl;
    while(s) {
      break;
    }
  }
  cout << p<<endl;
   while(seen) cout <<"Yes" <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:25: error: expected primary-expression before 'continue'
   25 |           cout << board[continue;
      |                         ^~~~~~~~
a.cc:25:25: error: expected ']' before 'continue'
   25 |           cout << board[continue;
      |                         ^~~~~~~~
      |                         ]
a.cc:45:2: error: expected '}' at end of input
   45 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int h,w;
  cin >>h>>w;
  string board[50];
  for (int i=0;i<h;i++) cin >> board[i];
  bool seen=true;
  int ni[8]={1,1,1,0,0,-1,-1,-1};
  int nj[8]={0,1,-1,1,-1,0,1,-1};   
  int p=0;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(board[i][j]=='.') continue;
      int x=i+ni;
      int y=j+nj;
      if(x<0 or y>h) continue;
      if(x>w or y<0) continue;
        
      if(board[x][y]=='#') p++;
        if(p==0){
          cout << "No" <<endl;
          seen=false;
          break;
        }
      }
    }
  }
  while(seen) cout <<"Yes" <<endl;
}
        

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

#include <iostream>
#include <vector>
//#define rep(i,n) for(int i = 0; i , (n); ++i)
using ll = long long;
using namespace std;

int sum(int n) {
    if (n == 0) {
        return 0;
    }

    int s = sum(n - 1);
    return s + n;
}
int main() {
    int N, W;
        cin >> N >> W;
        vector<vector<char>>A(N, vector<char>(W));
        
        for (int i = 0;i < N;i++) {
            for (int j = 0;j < W;i++) {
                cin >> A.at(i).at(j);
            }
        }
        bool hantei = true;
        for (int i = 0;i < N;i++) {
            for (int j = 0;j < W;j++){
                    if (A.at(i).at(j) == '#'&&A.at(i + 1).at(j) == '.' && A.at(i - 1).at(j) == '.' &&
                        A.at(i).at(j + 1) == '.' && A.at(i).at(j - 1) == '.') {
                         hantei=false;
                             break;
                    }
            //}
            //if (hantei == false) {
                //break;
            //}
        }
        if (hantei) {
            cout << "Yes";
        }
        else {
            cout << "No";
        }
}


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

#include <iostream>
#include <vector>
int main(){
	cout<<"Yes";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 |         cout<<"Yes";
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
#include <vector>
int main{
	cout<<"Yes";
}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 |         cout<<"Yes";
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:4:20: error: expected '}' before ';' token
    4 |         cout<<"Yes";
      |                    ^
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:1: error: expected declaration before '}' token
    5 | }
      | ^
Language: C++

#include <iostream>
#include <vector>
//#define rep(i,n) for(int i = 0; i , (n); ++i)
using ll = long long;
using namespace std;

int sum(int n) {
    if (n == 0) {
        return 0;
    }

    int s = sum(n - 1);
    return s + n;
}
int main() {
    int N, W;
        cin >> N >> W;
        vector<vector<char>>A(N, vector<char>(W));
        
        for (int i = 0;i < N;i++) {
            for (int j = 0;j < W;i++) {
                cin >> A.at(i).at(j);
            }
        }
        bool hantei = true;
        for (int i = 0;i < N;i++) {
            for (int j = 0;j < W;j++){
                    if (A.at(i).at(j) == '#'&&A.at(i + 1).at(j) == '.' && A.at(i - 1).at(j) == '.' &&
                        A.at(i).at(j + 1) == '.' && A.at(i).at(j - 1) == '.') {
                         hantei=false;
                             break;
                    }
            }
            if (hantei == false) {
                break;
            }
        }
        //if (hantei) {
            cout << "Yes";
        }
        else {
            //cout << "No";
        }
}


Compiler output:
a.cc:41:9: error: expected unqualified-id before 'else'
   41 |         else {
      |         ^~~~
a.cc:44:1: error: expected declaration before '}' token
   44 | }
      | ^
Language: C++

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

  string G[h];
  for (int i = 0; i < h; i++) cin >> G[i];

// 周囲四方向の差分を持った配列
 int dx[4] = {0, 1, 0, -1};
 int dy[4] = {1, 0, -1, 0};

  bool can = true;
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      if (G[i][j] == '#') {
        bool sharp = false;
        for (int d = 0; d < 4; d++) { //四方の確認
          if (i + dy[d] < 0 || h <= i + dy[d]) continue; //表外の確認
          if (j + dx[d] < 0 || w <= j + dx[d]) continue; //continueはそれ以下の処理は行わずfor loopを次に進める
          if (G[i + dy[d]][j + dx[d]] == '#') sharp = true; //四方の#の確認
        }
        if (sharp == false) can = false;
      }
    }
  }
  if(can)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
    return 0;
}
. 

Compiler output:
a.cc:34:1: error: expected unqualified-id before '.' token
   34 | .
      | ^
Language: C++

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

  string G[h];
  for (int i = 0; i < h; i++) cin >> G[i];

// 周囲四方向の差分を持った配列
 int dx[4] = {0, 1, 0, -1};
 int dy[4] = {1, 0, -1, 0};

  bool can = true;
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      if (G[i][j] == '#') {
        bool sharp = false;
        for (int d = 0; d < 4; d++) { //四方の確認
          if (i + dy[d] < 0 || h <= i + dy[d]) continue; //表外の確認
          if (j + dx[d] < 0 || w <= j + dx[d]) continue; //continueはそれ以下の処理は行わずfor loopを次に進める
          if (G[i + dy[d]][j + dx[d]] == '#') sharp = true; //四方の#の確認
        }
        if (sharp == false) can = false;
      }
    }
  }
  If(can)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
    return 0;
}
.

Compiler output:
a.cc: In function 'int main()':
a.cc:28:3: error: 'If' was not declared in this scope
   28 |   If(can)
      |   ^~
a.cc:30:3: error: 'else' without a previous 'if'
   30 |   else
      |   ^~~~
a.cc: At global scope:
a.cc:34:1: error: expected unqualified-id before '.' token
   34 | .
      | ^
Language: C++

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

  string G[h];
  for (int i = 0; i < h; i++) cin >> G[i];

// 周囲四方向の差分を持った配列
 int dx[4] = {0, 1, 0, -1};
 int dy[4] = {1, 0, -1, 0};

  bool can = true;
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      if (G[i][j] == '#') {
        bool sharp = false;
        for (int d = 0; d < 4; d++) { //四方の確認
          if (i + dy[d] < 0 || h <= i + dy[d]) continue; //表外の確認
          if (j + dx[d] < 0 || w <= j + dx[d]) continue; //continueはそれ以下の処理は行わずfor loopを次に進める
          if (G[i + dy[d]][j + dx[d]] == '#') sharp = true; //四方の#の確認
        }
        if (sharp == false) can = false;
      }
    }
  }
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:3: error: 'else' without a previous 'if'
   29 |   else
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
struct times
{
    int x,y,t;
    times(int x,int y,int t)
    {
        this -> x = x;
        this -> y = y;
        this -> t = t;
    }
}temp;
int dir[4][2] = {0,1,1,0,0,-1,-1,0};
int h,w,c,flag = 0;
char mp[51][51];
int vis[51][51];
int main()
{
    cin>>h>>w;
    for(int i = 0;i < h;i ++)
    {
        cin.get();
        for(int j = 0;j < w;j ++)
        {
            cin>>mp[i][j];
            if(mp[i][j] == '.')c ++;
        }
    }
    if(mp[0][0] == '.' && mp[h - 1][w - 1] == '.')
    {
        queue<times> q;
        q.push(times(0,0,1));
        vis[0][0] = 1;
        while(!q.empty())
        {
            if(flag)break;
            temp = q.front();
            q.pop();
            for(int i = 0;i < 4;i ++)
            {
                int tx = temp.x + dir[i][0];
                int ty = temp.y + dir[i][1];
                if(tx < 0 || ty < 0 || tx >= h || ty >= w || vis[tx][ty] || mp[tx][ty] == '#')continue;
                vis[tx][ty] = 1;
                if(tx == h - 1 && ty == w - 1)flag = temp.t + 1;
                q.push(times(tx,ty,temp.t + 1));
            }
        }
    }
    if(flag)cout<<c - flag;
    else cout<<-1;
}

Compiler output:
a.cc:12:2: error: no matching function for call to 'times::times()'
   12 | }temp;
      |  ^~~~
a.cc:6:5: note: candidate: 'times::times(int, int, int)'
    6 |     times(int x,int y,int t)
      |     ^~~~~
a.cc:6:5: note:   candidate expects 3 arguments, 0 provided
a.cc:3:8: note: candidate: 'constexpr times::times(const times&)'
    3 | struct times
      |        ^~~~~
a.cc:3:8: note:   candidate expects 1 argument, 0 provided
a.cc:3:8: note: candidate: 'constexpr times::times(times&&)'
a.cc:3:8: note:   candidate expects 1 argument, 0 provided
Language: C++

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

int main() {
  int H,W;
  cin >> H >> W;
  char s [H][W];
  for (int i=0;i<H;i++) {
    for (int j=0;j<W;j++) cin >> s[i][j];
  }
  int dx[4]={1,0,-1,0};
  int dy[4]={0,-1,0,1};
  bool can =true;
  for (int i=0;i<H;i++) {
    for (int j=0;j<W;j++) {
      bool found=false;
      if (s[x][y]=='#') {
        for (int k=0; k<4;k++) {
          int x=i+dx[k];
          int y=j+dy[k];
          if(0<=x&&x<H&&0<=y&&y<W&&s[x][y]=='#') found=true;
        }
        if (!found) {
          can=false;
          break;
        }
      }
    }
    if(!can) break;
  }
  if (can) cout<<"Yes"<<endl;
  else cout <<"No"<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'x' was not declared in this scope
   17 |       if (s[x][y]=='#') {
      |             ^
a.cc:17:16: error: 'y' was not declared in this scope
   17 |       if (s[x][y]=='#') {
      |                ^
Language: C++

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

int main() {
  int H,W;
  cin >> H >> W;
  char s [H][W];
  for (int i=0;i<H;i++) {
    for (int j=0;j<W;j++) cin >> s[i][j];
  }
  int dx[4]={1,0,-1,0};
  int dy[4]={0,-1,0,1};
  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 x=i+dx[k];
        int y=j+dy[k];
        if(0<=x&&x<H&&0<=y&&y<W&&s[x][y]=='#') found=true;
      }
      if (!found) {
        can=false;
        break;
      }
    }
    if(!found) break;
  }
  if (can) cout<<"Yes"<<endl;
  else cout <<"No"<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'found' was not declared in this scope; did you mean 'round'?
   27 |     if(!found) break;
      |         ^~~~~
      |         round
Language: C++

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

int main() {
  int H,W;
  cin >> H >> W;
  char s [H][W];
  for (int i=0;i<H;i++) {
    for (int j=0;j<W;j++) cin >> s[i][j];
  }
  int dx[4]={1,0,-1,0};
  int dy[4]={0,-1,0,1};
  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++) {
        x=i+dx[k];
        y=j+dy[k];
        if(0<=x&&x<H&&0<=y&&y<W&&s[x][y]=='#') found=true;
      }
      if (!found) {
        can=false;
        break;
      }
    }
    if(!found) break;
  }
  if (can) cout<<"Yes"<<endl;
  else cout <<"No"<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'x' was not declared in this scope
   18 |         x=i+dx[k];
      |         ^
a.cc:19:9: error: 'y' was not declared in this scope
   19 |         y=j+dy[k];
      |         ^
a.cc:27:9: error: 'found' was not declared in this scope; did you mean 'round'?
   27 |     if(!found) break;
      |         ^~~~~
      |         round
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9;
using namespace std;
using ll = long long;
vector<vector<char>> s(52, vector<char>(52));
int H, W, cnt;
int main() {
	cin >> H >> W;
	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) cin >> c[i][j];
	}
	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) {
			if (c[i][j] == '#' && c[i][j - 1] != '#' && c[i - 1][j] != '#' && c[i][j + 1] != '#' && c[i + 1][j] != '#') cnt++;
		}
	}
	if (cnt == 0) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:53: error: 'c' was not declared in this scope
   11 |                 for (int j = 1; j <= W; j++) cin >> c[i][j];
      |                                                     ^
a.cc:15:29: error: 'c' was not declared in this scope
   15 |                         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>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9;
using namespace std;
using ll = long long;
vector<vector<char>> s(52, vector<char>(52));
int main() {
	cin >> H >> W;
	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) cin >> c[i][j];
	}
	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) {
			if (c[i][j] == '#' && c[i][j - 1] != '#' && c[i - 1][j] != '#' && c[i][j + 1] != '#' && c[i + 1][j] != '#') cnt++;
		}
	}
	if (cnt == 0) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'H' was not declared in this scope
    8 |         cin >> H >> W;
      |                ^
a.cc:8:21: error: 'W' was not declared in this scope
    8 |         cin >> H >> W;
      |                     ^
a.cc:10:53: error: 'c' was not declared in this scope
   10 |                 for (int j = 1; j <= W; j++) cin >> c[i][j];
      |                                                     ^
a.cc:14:29: error: 'c' was not declared in this scope
   14 |                         if (c[i][j] == '#' && c[i][j - 1] != '#' && c[i - 1][j] != '#' && c[i][j + 1] != '#' && c[i + 1][j] != '#') cnt++;
      |                             ^
a.cc:14:133: error: 'cnt' was not declared in this scope; did you mean 'int'?
   14 |                         if (c[i][j] == '#' && c[i][j - 1] != '#' && c[i - 1][j] != '#' && c[i][j + 1] != '#' && c[i + 1][j] != '#') cnt++;
      |                                                                                                                                     ^~~
      |                                                                                                                                     int
a.cc:17:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   17 |         if (cnt == 0) cout << "Yes" << endl;
      |             ^~~
      |             int
Language: C++

#include<bits/stdc++.h>
#define rep(i,j,n) for(int i=(j);i<(n);i++)
#define per(i,n,j) for(int i=(n)-1;i>=(j);i--)
using ll=long long;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll INF=1LL<<60;

ll h,w;
vector<vector<char>> s(100,vector<char>(100));

int main(){
    cin>>h>>w;
    rep(i,1,h+1) rep(j,1,w+1) cin>>s[i][j];
    bool flag=true;
    rep(i,1,h+1){
        rep(j,1,w+1){
            if(s[i][j]=='#'){
                cnt++;
                if(s[i-1][j]!='#' && s[i+1][j]!='#' && s[i][j-1]!='#' && s[i][j+1]!='#') flag=false;
            }
        }
    }
    if(flag) cout<<"Yes"<<"\n";
    else cout<<"No"<<"\n";
    return 0;
}

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

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

int main(){
  int H,W;
  cin >> H >> W;
  string s[50];
  
  for(int i=0;i<H;i++)  cin >> s[i];
   
  for(int i=0;i<W;i++){
    for(int j=0;j<H;j++){
      if(s[i][j]=="#";&&
         (s[i][j-1]=="#"; ||
         s[i][j+1]=="#" ;||
         s[i-1][j]=="#" ;||
         s[i+1][j]=="#" ;||
         )
        )
      } cout <<"Yes"<<endl;return 0;
    }
  }
  cout <<"No"<<endl;

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |       if(s[i][j]=="#";&&
a.cc:14:10: error: expected identifier before '(' token
   14 |          (s[i][j-1]=="#"; ||
      |          ^
a.cc:13:25: error: expected ')' before '(' token
   13 |       if(s[i][j]=="#";&&
      |         ~               ^
      |                         )
   14 |          (s[i][j-1]=="#"; ||
      |          ~               
a.cc:14:27: error: expected primary-expression before '||' token
   14 |          (s[i][j-1]=="#"; ||
      |                           ^~
a.cc:15:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |          s[i][j+1]=="#" ;||
a.cc:15:26: error: expected primary-expression before '||' token
   15 |          s[i][j+1]=="#" ;||
      |                          ^~
a.cc:16:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |          s[i-1][j]=="#" ;||
a.cc:16:26: error: expected primary-expression before '||' token
   16 |          s[i-1][j]=="#" ;||
      |                          ^~
a.cc:17:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |          s[i+1][j]=="#" ;||
a.cc:17:26: error: expected primary-expression before '||' token
   17 |          s[i+1][j]=="#" ;||
      |                          ^~
a.cc:18:10: error: expected primary-expression before ')' token
   18 |          )
      |          ^
a.cc: At global scope:
a.cc:23:3: error: 'cout' does not name a type
   23 |   cout <<"No"<<endl;
      |   ^~~~
a.cc:25:1: error: expected unqualified-id before 'return'
   25 | return 0;
      | ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

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

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

int main() {
    int H, W;
    cin >> H >> W;
    string s[60];
    for (int i = 0; i < H; i++) cin >> s[i];

    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            if (s[i][j] == '.') continue;
            bool ok = false;
            for (int k = 0; k < 4; k++) {
                int x = i + dx[k], y = j + dy[k];
                if (x < 0 || x >= H || y < 0 || y >= W) continue;
                if (s[x][y] == '#') ok = true;
            }
            if (!ok) {
                break;
            }
        }
    }
	
  	if(ok)
    	cout << "Yes" << endl;
    else
      	cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:12: error: 'ok' was not declared in this scope
   28 |         if(ok)
      |            ^~
Language: C++

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

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

int main() {
    int H, W;
    cin >> H >> W;
    string s[60];
    for (int i = 0; i < H; i++) cin >> s[i];

    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            if (s[i][j] == '.') continue;
            bool ok = false;
            for (int k = 0; k < 4; k++) {
                int x = i + dx[k], y = j + dy[k];
                if (x < 0 || x >= H || y < 0 || y >= W) continue;
                if (s[x][y] == '#') ok = true;
            }
            if (!ok) {
                break;
            }
        }
    }
	
    if(check)
    	cout << "Yes" << endl;
   	else
      	cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:8: error: 'check' was not declared in this scope
   28 |     if(check)
      |        ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
    int H,W;
    cin >> H >> W;
    vector<vector<int>>s(H+2,vector<int>(W+2,'.'));
    for(int i = 1; i <= H; i++) {
        for(int j = 1; j <= W; j++) {
            int x;
            cin >> x;
            s[i][j] = x;
        }
    }
    for(int i = 1; i <= H; i++) {
        for(int j = 1; j <= H; j++) {
            if(s[i][j] == '.') {
                continue;
            }
            if(s[i-1][j] != '#' && s[i+1][j] != '#' &&
               s[i][j-1] ! ='#' && s[i][j+1] != '#') {
                cout << "No" << endl;
                return 0;
            }
        }
    }
    cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: expected ')' before '!' token
   21 |                s[i][j-1] ! ='#' && s[i][j+1] != '#') {
      |                         ^~
      |                         )
a.cc:20:15: note: to match this '('
   20 |             if(s[i-1][j] != '#' && s[i+1][j] != '#' &&
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int h,w;cin>>h>>w;
  vector<vector<char>> in(h,vector<char>(w));
  vector<vector<char>> out(h,vector<char>(w));
  for(int i=0;i<h;++i)for(int j=0;j<w;++j)cin>>in[i][j];
  for(int i=0;i<h;++i)for(int j=0;j<w;++j)out[i][j]='.';
  
  for(int i=0;i<h;++i){
    bool r=false;
    for(int j=0;j<w;++j){
      if(in[i][j]=='#'){
        out[i][j]='#';
        if(i>0)if(in[i-1][j]=='#')r=true;
        if(i<h-1)if(in[i+1][j]=='#')r=true;
        if(j>0)if(in[i][j-1]=='#')r=true;
        if(j>h-1)if(in[i][j+1]=='#')r=true;
      }
    }
    if(!r)return cout<<"No",0;
  }

  cout<<"Yes";

  }
}

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

#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)

int main() {
    int h,w,ans=1,ty;
    cin>>h>>w;
    vector<string>grid(h);
    rep(i,h)cin>>grid[i];
    rep(i,h)rep(j,w)if(grid[i][j]=='#'){
        ty=1;
        if(i>0&&grid[i-1][j]=='#')ty=0;
        else if(i<n-1&&grid[i+1][j]=='#')ty=0;
        else if(j>0&&grid[i][j-1]=='#')ty=0;
        else if(j<n-1&&grid[i][j+1]=='#')ty=0;
        
        if(ty)ans=0;
    }
    if(ans)cout<<"Yes";
    else cout<<"No";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: 'n' was not declared in this scope
   17 |         else if(i<n-1&&grid[i+1][j]=='#')ty=0;
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
#define COUT(x) cout<<(x)<<endl
#define dump(x)  cout << #x << " = " << (x) << endl;
using ll = long long;
using P = pair<int,int>;
using Graph = vector<vector<int>>;
using M = map<int,int>;
using PQ = priority_queue<int>;
using PQG = priority_queue<int, vector<int>, greater<int>>;
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

char g[55][55];
vector<P> dir = { {1,0},{-1,0},{0,1},{0,-1} };

int main() {
  int h,w; cin>>h>>w;
  REP(i,h) REP(j,w) { cin >> g[i+1][j+1]; }

  for (int i = 1; i<=h; i++) {
    for (int j = 1; j<=w; j++) {
      if (g[i][j] != '#') continue;
      int ok = 0;
      for (auto x: dir) {
        ok = ok || g[i+x.first][j+y.second] == '#'
      }
      if (!ok) { COUT("No"); return 0; }
    }
  }
  COUT("Yes");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:35: error: 'y' was not declared in this scope
   28 |         ok = ok || g[i+x.first][j+y.second] == '#'
      |                                   ^
Language: C++

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

int main() {
  int H,W;
  cin>>H>>W;
  char a;
  char vec[H][W];
  for(int k=0; k<H; k++ ){
  for(int j=0; j<W; j++){
  cin>>a;
  vec[k][j]=a;}}
  for(int k=0; k<H-1; k++ ){
  for(int j=0; j<W-1; j++){
  if(vec[k][j]=="#"&&vec[k][j+1]=="."&&vec[k+1][j]=="."){ 
  cout<<"No"<<endl;
  break;}
  else if(k==H-2&&j==W-2)
  cout<<"No"<<endl;
  else continue;}}}
  


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

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

int main() {
  int H,W;
  cin>>H>>W;
  char a;
  char vec[H][W];
  for(int k=0; k<H; k++ ){
  for(int j=0; j<W; j++){
  cin>>a;
  vec[k][j]=a;}}
  for(int k=0; k<H-1; k++ ){
  for(int j=0; j<W-1; j++){
  if(vec[k][j]="#"&&vec[k][j+1]="."&&vec[k+1][j]="."){ 
  cout<<"No"<<endl;
  break;}
  else if(k==H-2&&j==W-2)
  cout<<"No"<<endl;
  else continue;}}}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:15:36: error: lvalue required as left operand of assignment
   15 |   if(vec[k][j]="#"&&vec[k][j+1]="."&&vec[k+1][j]="."){
      |                                 ~~~^~~~~~~~~~~~~
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  
  string a[H];
  
  int dx[4] = {1, 0, -1, 0};
  int dy[4] = {0, 1, 0, -1};
  
  for (int i = 0; i < H; i++) {
    cin >> a[i];
  }
  
  string ans = "Yes";
  
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      
      if (a[i].at[j] == '#') {
        for (int k = 0; k < 4; k++) {
          ans = "No";
          
          if (i + dy[k] < 0 || i + dy[k] >= H 
              || j + dx[k] < 0 || j + dx[k] >= W) {
            continue;
          }
          
          if (a[i + dy[k]].at(j + dx[k]) == '#') {
            ans = "Yes";
          }
        }
        if (ans == "No") {
          cout << "No" << endl;
          return 0;
        }
      } 
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   22 |       if (a[i].at[j] == '#') {
      |                  ^
Language: C++

int main()
{cout << "Yes" << endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:2: error: 'cout' was not declared in this scope
    2 | {cout << "Yes" << endl;}
      |  ^~~~
a.cc:2:19: error: 'endl' was not declared in this scope
    2 | {cout << "Yes" << endl;}
      |                   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
  cin>>H>>W;
  vector<vector<int>>M(H+2,vector<int>(W+2,0));
  for(int i=1;i<=H;i++){
  for(int j=1;j<=W;j++){
  char c; cin>>c;
    if(c=='#')
      M[i][j]=1;
    else
      M[i][j]=0;
  }
  
  } bool ans=true;
  for(int i=1;i<=H;i++){
    for(int j=1;j<=W;j++){
    if(A[i][j]==1){
    if(A[i-1][j]+A[i+1][j]+A[i][j-1]+A[i][j+1]==0)
         ans=false; break;
    
    }
    
    }
    
  }if(ans)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
   return 0;
}
 



Compiler output:
a.cc: In function 'int main()':
a.cc:19:8: error: 'A' was not declared in this scope
   19 |     if(A[i][j]==1){
      |        ^
Language: C++

#import collections
#aa = collections.Counter(a) # list to list
#from itertools import combinations # (string,3) 3回

mod = 10**9 + 7

dx = [-1,0,1,0]
dy = [0,-1,0,1]

def readInts():
  return list(map(int,input().split()))
def search(S,x,y,h,w):
    #全探索で間に合うべ
    cnt = 0
    for i in range(4):
        nx = x + dx[i]
        ny = y + dy[i]
        if 0 <= nx < w and 0 <= ny < h:
            if S[nx][ny] == '#':
                cnt += 1
    if not cnt:#隣接する#が一つもない
        return False
    else:
        return True

def main():
    h,w = readInts()
    S = [list(input()) for _ in range(h)]
    for i in range(h):
        for j in range(w):
            if S[i][j] == '#':
                if search(S,i,j,h,w):
                    pass
                else:
                    print('No')
                    exit()
    print('Yes')


if __name__ == '__main__':
  main()


Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import collections
      |  ^~~~~~
a.cc:1:9: error: #import expects "FILENAME" or <FILENAME>
    1 | #import collections
      |         ^~~~~~~~~~~
a.cc:2:2: error: invalid preprocessing directive #aa
    2 | #aa = collections.Counter(a) # list to list
      |  ^~
a.cc:3:2: error: invalid preprocessing directive #from
    3 | #from itertools import combinations # (string,3) 3回
      |  ^~~~
a.cc:13:6: error: invalid preprocessing directive #\U00005168\U000063a2\U00007d22\U00003067\U00009593\U0000306b\U00005408\U00003046\U00003079
   13 |     #全探索で間に合うべ
      |      ^~~~~~~~~~~~~~~~~~
a.cc:21:16: error: stray '#' in program
   21 |     if not cnt:#隣接する#が一つもない
      |                ^
a.cc:21:25: error: stray '#' in program
   21 |     if not cnt:#隣接する#が一つもない
      |                         ^
a.cc:35:27: warning: multi-character character constant [-Wmultichar]
   35 |                     print('No')
      |                           ^~~~
a.cc:37:11: warning: multi-character character constant [-Wmultichar]
   37 |     print('Yes')
      |           ^~~~~
a.cc:40:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   40 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:5:1: error: 'mod' does not name a type
    5 | mod = 10**9 + 7
      | ^~~
Language: C++

h,w = map(int, input().split())
a = [list(input()) for _ in range(h)]
dx = [1,0,-1,0]
dy = [0,1,0,-1]
for k in range(h):
    for j in range(w):
        x,y = k,j
        if a[x][y] == "#":
            for i in range(4):
                xi,yi = x+dx[i],y+dy[i]
                if 0 <= xi < h and 0 <= yi < w and a[xi][yi] == "#":
                    break
            else:
                print("No")
                exit()
 
print("Yes")
h,w = map(int, input().split())
a = [list(input()) for _ in range(h)]
dx = [1,0,-1,0]
dy = [0,1,0,-1]
for k in range(h):
    for j in range(w):
        x,y = k,j
        if a[x][y] == "#":
            for i in range(4):
                xi,yi = x+dx[i],y+dy[i]
                if 0 <= xi < h and 0 <= yi < w and a[xi][yi] == "#":
                    break
            else:
                print("No")
                exit()

print("Yes")

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

#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0);
#define FOR(i,s,n) for(int i = (s); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) for(int i = (n); i >= 0; i--)
#define ALL(n) (n).begin(), (n).end()
#define RALL(n) (n).rbegin(), (n).rend()
#define ATYN(n) cout << ( (n) ? "Yes":"No") << '\n';
#define CFYN(n) cout << ( (n) ? "YES":"NO") << '\n';
#define OUT(n) cout << (n) << '\n';
using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;

int main(void)
{
    IOS
    const vector<int> dx{0,0,1,-1};
    const vector<int> dy{-1,1,0,0);
    int h, w;
    cin >> h >> w;
    vector<string> ss(h);
    REP(i,h) cin >> ss[i];

    bool ans = true;
    REP(y,h) REP(x,w) {
        if (ss[y][x] == '.') continue;
        REP(i,5) {
            if (i == 4) {
                ans = false;
                break;
            }
            int x2 = x + dx[i];
            int y2 = y + dx[i];
            if (x2 < 0 || x2 >= w) continue;
            if (y2 < 0 || y2 >= h) continue;
            if (ss[y2][x2] == '#') break;
            
        }
        if (!ans) break;
    }

    ATYN(ans)

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:34: error: expected '}' before ')' token
   21 |     const vector<int> dy{-1,1,0,0);
      |                         ~        ^
a.cc:21:34: error: expected ',' or ';' before ')' token
Language: C++

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

int h,w;
int dx[4] = {1,-1,0,0};
int dy[4] = {0,0,1,-1};
char s[60][60];

int main(){
  cin >> h >> w;
  
  for (int i=0;i<h;i++) cout << s[h][w] << endl;
  bool ans = true;
  
  for (int i=0;i<h;i++){
    for (int j=0;j<w;j++){
       if (s[i][j] == '#'){
          bool found = false; 
          for (int k=0;k<4;k++){
            int i2=i+dx[k];
            int j2=j+dy[k];
            if (i2>=0&&i2<h&&j2>=0&&j2<w&&s[i2][j2]='#')
              found = true;
          }
       }
      if (!found) ans = false;
    }
  }
}
cout << (ans ? "Yes" : "No") << endl;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:22:41: error: lvalue required as left operand of assignment
   22 |             if (i2>=0&&i2<h&&j2>=0&&j2<w&&s[i2][j2]='#')
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
a.cc:26:12: error: 'found' was not declared in this scope; did you mean 'round'?
   26 |       if (!found) ans = false;
      |            ^~~~~
      |            round
a.cc: At global scope:
a.cc:30:1: error: 'cout' does not name a type
   30 | cout << (ans ? "Yes" : "No") << endl;
      | ^~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: Java

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            int h = sc.nextInt();
            int w = sc.nextInt();
            String line[] = new String[h];
            for(int i=0;i<h;i++){
              line[i] = sc.next();
            }

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

            boolean check = true;
            
            for(int i=0;i<h;i++){
              for(int j=0;j<w;j++){
                if(line[i].charAt(j)!='#')break;
                check = false;
                for(int k=0;k<4;k++){
                   int dx = i+x[k];
                   int dy = j+y[k];
                   if(dx<0||dx>=h||dy<0||dy>=w) continue;
                   if(line[dx].charAt(dy)=='#'){
                     check = true;
                     continue;
                   }
                }
                if(!check)break;
              }
              if(!check)break
            }

          String ans = check?"Yes":"No";
          System.out.println(ans);
          }
        }

Compiler output:
Main.java:34: error: ';' expected
              if(!check)break
                             ^
1 error
Language: C++

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

int main(void)
{
  int H, W;
  cin >> H >> W;
  string S[50];
  
  for (int i=0;i<H;i++){
    cin >> S[i];
  }
  
  bool can = true;
  int dy[4] = {0, 1, 0, -1};
  int dx[4] = {1, 0, -1, 0};
  
  for (int i=0;i<H;i++){
    for (int j=0;j<W;j++){
      if (S[i][j] != '#') continue;
      
      for (int k=0;k<4;k++){
        int ni = i + dy[k];
        int nj = j + dx[k];
        
        if (S[ni][nj] == '#') break;
      }
      if (k == 4){
        can = false;
      }
    }
    if (!can) break;
  }
  
  if (can){
    cout << "Yes" << endl;
  }else {
    cout << "No" << endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:11: error: 'k' was not declared in this scope
   28 |       if (k == 4){
      |           ^