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>> vec(h, vector<char>(w));
  for(int i=0; i<h; i++){
    for(int j=0; j<w; j++){
      char x;
      cin >> x;
      vec.at(i).at(j)=x;
    }
  }
  vector<vector<int>> num(h, vector<int>(w));
  for(int i=0; i<h; i++){
    for(int j=0; j<w; j++){
      int count1=0; 
      int count2=0;
      if(i &= 0){
        count1=num.at(i-1).at(j);
        if(vec.at(i).at(j)　&=　vec.at(i-1).at(j)) count1++;
      }
      else count1=10000;
      if(j　&=　0) {
        count2=num.at(i).at(j-1);
        if(vec.at(i).at(j)&=vec.at(i).at(j-1)) count2++;
      }
      else count2=10000;
      int x=min(count1,count2);
      if(x=10000) x=0;
      num.at(i).at(j)=x;
    }
  }
    cout << vec.at(h).at(w) << endl;
}
      

Compiler output:
a.cc:22:27: error: extended character 　 is not valid in an identifier
   22 |         if(vec.at(i).at(j)　&=　vec.at(i-1).at(j)) count1++;
      |                           ^
a.cc:22:31: error: extended character 　 is not valid in an identifier
   22 |         if(vec.at(i).at(j)　&=　vec.at(i-1).at(j)) count1++;
      |                               ^
a.cc:25:10: error: extended character 　 is not valid in an identifier
   25 |       if(j　&=　0) {
      |          ^
a.cc:25:15: error: extended character 　 is not valid in an identifier
   25 |       if(j　&=　0) {
      |               ^
a.cc: In function 'int main()':
a.cc:22:27: error: expected ')' before '\U00003000'
   22 |         if(vec.at(i).at(j)　&=　vec.at(i-1).at(j)) count1++;
      |           ~               ^~
      |                           )
a.cc:25:10: error: 'j\U00003000' was not declared in this scope
   25 |       if(j　&=　0) {
      |          ^~~
a.cc:25:15: error: '\U000030000' was not declared in this scope
   25 |       if(j　&=　0) {
      |               ^~~
Language: C++

#include <iostream>
#include<bits/stdc++.h>
using namespace std;
ll dp[200][200];
char p[200][200];
int main()
{
    int h,w;
    cin>>h>>w;
    getchar();
    for(int i=1;i<=h;i++){
      for(int j=1;j<=w;j++){
         scanf("%c",&p[i][j]);
         if(p[i][j]=='#') dp[i][j]=1;
    }
    getchar();
    }
    for(int i=2;i<=w;i++)
          if(dp[1][i-1])dp[1][i]+=dp[1][i-1];
    for(int i=2;i<=h;i++)
        if(dp[i-1][1])dp[i][1]+=dp[i-1][1];
    /*for(int i=1;i<=h;i++){
    for(int j=1;j<=w;j++){
        cout<<dp[i][j];
    }
    cout<<endl;
    }*/
    for(int i=2;i<=h;i++)
     for(int j=2;j<=w;j++){
        dp[i][j]+=min(dp[i-1][j],dp[i][j-1]);
    }
   /* for(int i=1;i<=h;i++){
    for(int j=1;j<=w;j++){
        cout<<dp[i][j];
    }
    cout<<endl;
    }*/
    cout<<dp[h][w];
    return 0;
}


Compiler output:
a.cc:4:1: error: 'll' does not name a type
    4 | ll dp[200][200];
      | ^~
a.cc: In function 'int main()':
a.cc:14:27: error: 'dp' was not declared in this scope; did you mean 'p'?
   14 |          if(p[i][j]=='#') dp[i][j]=1;
      |                           ^~
      |                           p
a.cc:19:14: error: 'dp' was not declared in this scope; did you mean 'p'?
   19 |           if(dp[1][i-1])dp[1][i]+=dp[1][i-1];
      |              ^~
      |              p
a.cc:21:12: error: 'dp' was not declared in this scope; did you mean 'p'?
   21 |         if(dp[i-1][1])dp[i][1]+=dp[i-1][1];
      |            ^~
      |            p
a.cc:30:9: error: 'dp' was not declared in this scope; did you mean 'p'?
   30 |         dp[i][j]+=min(dp[i-1][j],dp[i][j-1]);
      |         ^~
      |         p
a.cc:38:11: error: 'dp' was not declared in this scope; did you mean 'p'?
   38 |     cout<<dp[h][w];
      |           ^~
      |           p
Language: C++

#include "../../library/template.cpp"

ll h, w;
string s[100];

ll dfs(ll i, ll j) {
  if (i == h-1 and j == w-1) return 0;

  ll n = 1LL<<60, m = 1LL<<60;
  if (i+1 < h) n = dfs(i+1, j);
  if (j+1 < w) m = dfs(i, j+1);

  if (i+1 < h and s[i+1][j] == '#' and s[i][j] == '.') {
    n++;
  }
  if (j+1 < w and s[i][j+1] == '#' and s[i][j] == '.') {
    m++;
  }
  
  if (i == 0 and j == 0) {
    if (i+1 < h and s[i+1][j] == '.' and s[i][j] == '#') {
      n++;
    }
    if (j+1 < w and s[i][j+1] == '.' and s[i][j] == '#') {
      m++;
    }
  }
  return min(n, m);
}

int main() {
  cin >> h >> w;
  rep(i, h) {
    cin >> s[i];
  }

  ll ans = dfs(0, 0);

  cout << ans << endl;
}


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

#include <iostream>
using namespace std:

int H, W;
int count = 0;

int main(){
    cin >> H >> W;
    const char s[H - 1][W - 1];
    for(int h = 0; h < H; h++){
        for(int w = 0; w < W; w++){
            cin >> s[h][w];
        }
    }
    if(s[0][0] == "#"){
         s[0][0] = ".";
         count++;
    }
    int h = 0, w = 0;
    while(s[h][w] != s[H - 1][W - 1]){
        if(s[h + 1][w] == "."){
            h++;
            w++;
            if(s[h][w] == "#"){
                s[h][w] == ".";
                count++;
            }
        }
        else if(s[h][w + 1] == "."){
            h++;
            w++;
            if(s[h][w] == "#"){
                s[h][w] == ".";
                count++;
            }
        }
        else{
            h++;
            s[h][w] == ".";
            count++;
            w++;
            if(s[h][w] == "#"){
                s[h][w] == ".";
                count++;
            }
        }
    }
    cout << count << endl;
}

Compiler output:
a.cc:2:20: error: expected ';' before ':' token
    2 | using namespace std:
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before ':' token
a.cc: In function 'int main()':
a.cc:8:12: error: 'H' was not declared in this scope
    8 |     cin >> H >> W;
      |            ^
a.cc:8:17: error: 'W' was not declared in this scope
    8 |     cin >> H >> W;
      |                 ^
a.cc:12:20: error: 's' was not declared in this scope
   12 |             cin >> s[h][w];
      |                    ^
a.cc:15:8: error: 's' was not declared in this scope
   15 |     if(s[0][0] == "#"){
      |        ^
a.cc:20:11: error: 's' was not declared in this scope
   20 |     while(s[h][w] != s[H - 1][W - 1]){
      |           ^
Language: C++

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

int main(void) {
	int H, W;
	cin >> H >> W;
	int HW = H * W;
	vector<int>s(HW);
	for (int i = 0; i < HW; i++) {
		cin >> s[i];
	}
	int AA = 0;
	//---------------

	if (s[0] == "#") {

	}


}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |         if (s[0] == "#") {
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  int i , j ;
  int H , W ;
  char A[H][W];
  std::string B[H];
  int a , ans ;
  
  cin >> H , W ;
  
  for(i=1;i<=H;i++){
  cin >> B[i] ;
  }
  
  for(i=1;i<=W;i++){
    for(j=1;j<=H;j++){
       A[i][j] = B[i].at(j) ;
    }
  }
  
  for(i=1;i<=W;i++){
    for(j=1;j<=H;j++){
      if(A[i][j] == '#'){
        a++ ; 
      }
      if(a <= ans)
        ans = a ;
    }
  }

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

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

int main(){
	int h,w;
 	cin >> h >>w;
  	vector<vector<string>>data(h.vector<string>(w));
  	for(int i =0;i<h;i++){
    	for(int =0;j<w;j++){
        cin >>data.at(i)at(j);	
        }
    }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:38: error: invalid use of 'class std::vector<std::__cxx11::basic_string<char> >'
    7 |         vector<vector<string>>data(h.vector<string>(w));
      |                                      ^~~~~~~~~~~~~~
a.cc:9:17: error: expected unqualified-id before '=' token
    9 |         for(int =0;j<w;j++){
      |                 ^
a.cc:9:16: error: expected ';' before '=' token
    9 |         for(int =0;j<w;j++){
      |                ^~
      |                ;
a.cc:9:17: error: expected primary-expression before '=' token
    9 |         for(int =0;j<w;j++){
      |                 ^
a.cc:9:20: error: 'j' was not declared in this scope
    9 |         for(int =0;j<w;j++){
      |                    ^
a.cc:9:23: error: expected ')' before ';' token
    9 |         for(int =0;j<w;j++){
      |            ~          ^
      |                       )
a.cc:9:24: error: 'j' was not declared in this scope
    9 |         for(int =0;j<w;j++){
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std; 
 
const int dx[2]={0,1},dy[2]={1,0};
bool vistied[105][105];
int h,w,ans=205;
string s[105];
 
int dfs(int x,int y,int k)
{
	if(x>h-1 || y>w-1 || visited[x][y])
		return 0;
	if(s[x][y] == '#')
		k++;
	if(x == h-1 && y == w-1)
	{
		ans=min(ans,k);
		return 0;	
	} 
	for(int i=0;i<2;i++)
		dfs(x+dx[i],y+dy[i],k);
} 
 
int main()
{
	ios_base::sync_with_stdio(0);
	cin >> h >> w;
	for(int i=0;i<h;i++)
		cin >> s[i];
	visited[0][0] = 1;
	dfs(0,0,0);
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int dfs(int, int, int)':
a.cc:11:30: error: 'visited' was not declared in this scope; did you mean 'vistied'?
   11 |         if(x>h-1 || y>w-1 || visited[x][y])
      |                              ^~~~~~~
      |                              vistied
a.cc: In function 'int main()':
a.cc:30:9: error: 'visited' was not declared in this scope; did you mean 'vistied'?
   30 |         visited[0][0] = 1;
      |         ^~~~~~~
      |         vistied
a.cc: In function 'int dfs(int, int, int)':
a.cc:22:1: warning: control reaches end of non-void function [-Wreturn-type]
   22 | }
      | ^
Language: C

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

int main() {
  int h, w;
  cin >> h >> w;
  vector<vector<int>> s(h+1, vector<int>(w+1, 0));
  char c;

  for (int i = 1; i <= h; i++) {
    for (int j = 1; j <= w; j++) {
      cin >> c;
      if (c == '.') {
        s[i][j] = 0;
      } else {
        s[i][j] = 1;
      }
    }
  }

  for (int i = 1; i <= h; i++) {
    for (int j = 1; j <= w; j++) {
      if (i == 1) {
        s[0][j] = s[1][j-1];
      }
      if (j == 1) {
        s[i][0] = s[i-1][1];
      }
      s[i][j] = min(s[i-1][j], s[i][j-1]) + s[i][j];
    }
  }

  cout << s[h][w] << endl;
}

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

#include<bits/stdc++.h>
using namespace std;
#define ll  long long
#define endl '\n'
#define FASTINOUT ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
const ll mod = 998244353;
const int N=1e5+9;
ll dp[109][109];
char a[109][109];
int r,c;
ll f(int i,int j){
    if (i>r||i<1||j>c||j<1)
        return 1e9;
    if (i==r&&j==c)
        return (a[i][j]=='#');
    if (dp[i][j]!=-1)
        return dp[i][j];
    return dp[i][j]=min(f(i+1,j),f(i,j+1))++(a[i][j]=='#');
}
int main()
{
    FASTINOUT;
    cin>>r>>c;
    for (int i=1;i<=r;i++)
        for (int j=1;j<=c;j++)
        cin>>a[i][j];
    memset(dp,-1,sizeof dp);
    cout<<f(1,1)<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'long long int f(int, int)':
a.cc:18:24: error: increment of read-only location 'std::min<long long int>(f((i + 1), j), f(i, (j + 1)))'
   18 |     return dp[i][j]=min(f(i+1,j),f(i,j+1))++(a[i][j]=='#');
      |                     ~~~^~~~~~~~~~~~~~~~~~~
a.cc:18:45: error: expression cannot be used as a function
   18 |     return dp[i][j]=min(f(i+1,j),f(i,j+1))++(a[i][j]=='#');
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  int i , j ;
  int H , W ;
  std::string A[H][W];
  std::string B[H];
  int a , ans ;
  
  cin >> H , W ;
  
  for(i=1;i<=H;i++){
  cin >> B[i] ;
  }
  
  for(i=1;i<=W;i++){
    for(j=1;j<=H;j++){
      cin >> A[B[i].at(j)][i] ;
    }
  }
  
  for(i=1;i<=W;i++){
    for(j=1;j<=H;j++){
      if(A[i,j] == "#"){
        a++ ; 
      }
      if(a <= ans)
        ans = a ;
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:26:17: error: comparison between distinct pointer types 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} and 'const char*' lacks a cast
   26 |       if(A[i,j] == "#"){
      |          ~~~~~~~^~~~~~
a.cc:32:4: error: expected '}' at end of input
   32 |   }
      |    ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  int i , j ;
  int H , W ;
  std::string A[H][W];
  std::string B[H];
  int a , ans ;
  
  cin >> H , W ;
  
  for(i=1;i<=H;i++){
  cin >> B[i] ;
  }
  
  for(i=1;i<=W;i++){
    for(j=1;j<=H;j++){
      cin >> A[B[i].at(j)][i] ;
    }
  }
  
  for(i=1;i<=W;i++){
    for(j=1;j<=H;j++){
      if(A[i,j] == '#'){
        a++ ; 
      }
      if(a <= ans)
        ans = a ;
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:26:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |       if(A[i,j] == '#'){
      |          ~~~~~~~^~~~~~
a.cc:32:4: error: expected '}' at end of input
   32 |   }
      |    ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  int i , j ;
  int H , W ;
  std::string A[H][W];
  std::string B[H];
  int a , ans ;
  
  cin >> H , W ;
  
  for(i=1;i<=H;i++){
  cin >> B[i]
  }
  
  for(i=1;i<=W;i++){
    for(j=1;j<=H;j++){
      cin >> A[B[i].at(j)][i]
    }
  }
  
  for(i=1;i<=W;i++){
    for(j=1;j<=H;j++){
      if(A[i,j] == '#'){
        a++ ; 
      }
      if(a <= ans)
        ans = a ;
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: expected ';' before '}' token
   15 |   cin >> B[i]
      |              ^
      |              ;
   16 |   }
      |   ~           
a.cc:20:30: error: expected ';' before '}' token
   20 |       cin >> A[B[i].at(j)][i]
      |                              ^
      |                              ;
   21 |     }
      |     ~                         
a.cc:26:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |       if(A[i,j] == '#'){
      |          ~~~~~~~^~~~~~
a.cc:32:4: error: expected '}' at end of input
   32 |   }
      |    ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
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));
  	for(int i =0;i<h;i++){
    	for(int =j;j<w;j++){
        cin >>data.at(i)at(j);	
        }
    }


}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:36: error: invalid use of 'class std::vector<char>'
    7 |         vector<vector<char>>data(h.vector<char>(w));
      |                                    ^~~~~~~~~~~~
a.cc:9:17: error: expected unqualified-id before '=' token
    9 |         for(int =j;j<w;j++){
      |                 ^
a.cc:9:16: error: expected ';' before '=' token
    9 |         for(int =j;j<w;j++){
      |                ^~
      |                ;
a.cc:9:17: error: expected primary-expression before '=' token
    9 |         for(int =j;j<w;j++){
      |                 ^
a.cc:9:18: error: 'j' was not declared in this scope
    9 |         for(int =j;j<w;j++){
      |                  ^
a.cc:9:23: error: expected ')' before ';' token
    9 |         for(int =j;j<w;j++){
      |            ~          ^
      |                       )
a.cc:9:24: error: 'j' was not declared in this scope
    9 |         for(int =j;j<w;j++){
      |                        ^
Language: C++

//In the name of Allah...
// Name -- Aayan 

//Header Files......
#include<iostream>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<unordered_map> 
#include<map>
#include<set>
#include<cmath>
#include<algorithm>
#include<limits.h>
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
using namespace std;

//Macros..............
#define ll long long
#define d double
#define ld long double
#define fast(); ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define loop(i,a,b) for(i=(ll)a;i<(ll)b;++i)
#define eloop(i,a,b) for(i=(ll)a;i<=(ll)b;++i)
#define pb(a) push_back(a)
#define mk(a,b) make_pair(a,b)
#define mod 998244353 


void solve(){
  ll n,m;
  cin>>n>>m;
  char arr[n][m];
  for(ll i=0;i<n;i++){
      for(ll j=0;j<m;j++) cin>>arr[i][j];
  }
  ll ans[n][m];  memset(ans,0,sizeof(ans));
  for(ll i=0;i<n;i++){
      for(ll j=0;j<m;j++){
          if(i==0 && j==0){
              if(arr[i][j]=='#') ans[i][j] +=1;
          }else if(i==n-1 && j==m-1){
              ans[i][j] = min(ans[i-1][j],ans[i][j-1]);
              if(arr[i][j]=='#'){
                  ans[i][j] +=1;
              }
          }else{
              if(i==0){
                  ans[i][j]= ans[i][j-1];
                  if(arr[i][j]=='#') ans[i][j] +=1;
              }else if(j==0){
                  ans[i][j] = ans[i-1][j];
                  if(arr[i][j]=='#') ans[i][j] += 1;
              }else{
                  ans[i][j] = min(ans[i-1][j],ans[i][j-1]);
                  if(arr[i][j]=='#') ans[i][j] +=1;
              }
          }
      }
  }
//   for(ll i=0;i<n;i++){
//       for(ll j=0;j<m;j++) cout<<ans[i][j]<<" ";  cout<<endl;
//   }
  cout<<ans[n-1][m-1];
}
int main() {
	// your code goes here
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	//cin>>t;

Compiler output:
a.cc: In function 'int main()':
a.cc:76:13: error: expected '}' at end of input
   76 |         t=1;
      |             ^
a.cc:70:12: note: to match this '{'
   70 | int main() {
      |            ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int min(int a,int b){
if(a<b)return a;
return b;
}
int main(){
  int H,W;
  cin>>H>>W;
  vector<vector<int>> a(H,vector<int>(W,1)),dp(H+1,vector<int>(W+1,1000));
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      char s[1];
      cin>>s[0];
      if(s[0]=='.')a[i][j]=0;
      }
  }
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      dp[i+1][j+1]=min(dp[i+1][j],dp[i][j+1])+a[i][j];
      }
  }
  cout<<dp[H][W]<<endl;
  return 0;
  }
 
  
#include<iostream>
#include<vector>
using namespace std;
int min(int a,int b){
if(a<b)return a;
return b;
}
int main(){
  int H,W;
  cin>>H>>W;
  vector<vector<int>> a(H,vector<int>(W,1)),dp(H+1,vector<int>(W+1,1000));
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      char s[1];
      cin>>s[0];
      if(s[0]=='.')a[i][j]=0;
      }
  }
  dp[0][1]=a[0][0];
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      dp[i+1][j+1]=min(dp[i+1][j],dp[i][j+1])+a[i][j];
      }
  }
  cout<<dp[H][W]<<endl;
  return 0;
  }


Compiler output:
a.cc:32:5: error: redefinition of 'int min(int, int)'
   32 | int min(int a,int b){
      |     ^~~
a.cc:4:5: note: 'int min(int, int)' previously defined here
    4 | int min(int a,int b){
      |     ^~~
a.cc:36:5: error: redefinition of 'int main()'
   36 | int main(){
      |     ^~~~
a.cc:8:5: note: 'int main()' previously defined here
    8 | int main(){
      |     ^~~~
Language: C++

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

int main() {
  int H,W;
  cin >> H,W;
  vector<vector<char>> v(H,vector<char>(W));
  for (int i = 0;i < H;i++) {
    for (int j = 0;i < W;j++) {
      cin >> v.at(i).at(j);
    }
  }
  int mm;
  mm = min(H,W);
  int count = mm;
  bool finished = false;
  if (v.at(0).at(0) != '#') {
    count--;
  }
  else if (v.at(H-1).at(W-1) != '#') {
    count--;
  }
   
  for (int i = 0;i < H;i++) {
    for (int j = 0;i < W;j++) {
      if (v.at(i).at(j) == v.at(i).at(j+1)) {
        cout--;
      }
      else if (v.at(i).at(j) == v.at(i+1).at(j)) {
        count--;
      }
    }
  }
  return 0;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:27:13: error: no 'operator--(int)' declared for postfix '--' [-fpermissive]
   27 |         cout--;
      |         ~~~~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  int i , j ;
  int H , W ;
  std::string A[H,W];
  std::string B[H];
  int a , ans ;
  
  cin >> H , W ;
  
  for(i=1;i<=H;i++){
  cin >> B[i]
  }
  
  for(i=1;i<=W;i++){
    for(j=1;j<=H;j++){
      cin >> A[B[i].at(j),i]
    }
  }
  
  for(i=1;i<=W;i++){
    for(j=1;j<=H;j++){
      if(A[i,j] == #){
        a++ ; 
      }
      if(a <= ans)
        ans = a ;
    }
  }
 
return 0;
}

Compiler output:
a.cc:26:20: error: stray '#' in program
   26 |       if(A[i,j] == #){
      |                    ^
a.cc: In function 'int main()':
a.cc:8:18: error: expected ']' before ',' token
    8 |   std::string A[H,W];
      |                  ^
      |                  ]
a.cc:8:20: error: expected initializer before ']' token
    8 |   std::string A[H,W];
      |                    ^
a.cc:15:14: error: expected ';' before '}' token
   15 |   cin >> B[i]
      |              ^
      |              ;
   16 |   }
      |   ~           
a.cc:20:14: error: 'A' was not declared in this scope
   20 |       cin >> A[B[i].at(j),i]
      |              ^
a.cc:20:23: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   20 |       cin >> A[B[i].at(j),i]
      |                ~~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1309:7: note: declared here
 1309 |       at(size_type __n)
      |       ^~
a.cc:26:10: error: 'A' was not declared in this scope
   26 |       if(A[i,j] == #){
      |          ^
a.cc:26:21: error: expected primary-expression before ')' token
   26 |       if(A[i,j] == #){
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2 * 1e5 + 10;
const int inf = (1953125 << 9);
//bool vis[maxn];
 
int n, m;
char a[101][101];
int dx[] = { 1, 0 };
int dy[] = { 0, -1 };
 
int run(int x, int y, int cnt) {
 
	if (x < 0 || y < 0 || x >= n || y >= m || cnt > res)
		return cnt;
 
//	cout << x << " " << y << " > " << cnt << endl;
 
	if (x == n - 1 && y == m - 1) {
		return cnt;
	}
 
	return min(run(x + 1, y, cnt + (a[x + 1][y] == '#')),
			run(x, y + 1, cnt + (a[x][y + 1] == '#')));
 
}
 
int main() {
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
//	memset(vis, 0, sizeof vis);
//	freopen("in/input.txt", "r", stdin); // freopen("output.txt", "w", stdout);
	cin >> n >> m;
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < m; ++j) {
			cin >> a[i][j];
		}
	}
	cout << run(0, 0, (a[0][0] == '#' ? 1 : 0)) << endl;
}

Compiler output:
a.cc: In function 'int run(int, int, int)':
a.cc:15:57: error: 'res' was not declared in this scope
   15 |         if (x < 0 || y < 0 || x >= n || y >= m || cnt > res)
      |                                                         ^~~
Language: C++

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

int main()
{
  int i , j ;
  int H , W ;
  std::string A[H,W];
  std::string B[H];
  int a , ans ;
  
  cin >> H , W ;
  
  for(i=1,i<=H,i++){
  cin >> B[i]
  }
  
  for(i=1,i<=W,i++){
    for(j=1,j<=H,j++){
      cin >> A[B[i].at(j),i]
    }
  }
  
  for(i=1,i<=W,i++){
    for(j=1,j<=H,j++){
      if(A[i,j] == #){
        a++ ; 
      }
      if(a <= ans)
        ans = a ;
    }
  }

return 0;
}


Compiler output:
a.cc:26:20: error: stray '#' in program
   26 |       if(A[i,j] == #){
      |                    ^
a.cc: In function 'int main()':
a.cc:8:18: error: expected ']' before ',' token
    8 |   std::string A[H,W];
      |                  ^
      |                  ]
a.cc:8:20: error: expected initializer before ']' token
    8 |   std::string A[H,W];
      |                    ^
a.cc:14:19: error: expected ';' before ')' token
   14 |   for(i=1,i<=H,i++){
      |                   ^
      |                   ;
a.cc:18:3: error: expected primary-expression before 'for'
   18 |   for(i=1,i<=W,i++){
      |   ^~~
a.cc:16:4: error: expected ';' before 'for'
   16 |   }
      |    ^
      |    ;
   17 | 
   18 |   for(i=1,i<=W,i++){
      |   ~~~
a.cc:18:3: error: expected primary-expression before 'for'
   18 |   for(i=1,i<=W,i++){
      |   ^~~
a.cc:16:4: error: expected ')' before 'for'
   16 |   }
      |    ^
      |    )
   17 | 
   18 |   for(i=1,i<=W,i++){
      |   ~~~
a.cc:14:6: note: to match this '('
   14 |   for(i=1,i<=H,i++){
      |      ^
a.cc:18:19: error: expected ';' before ')' token
   18 |   for(i=1,i<=W,i++){
      |                   ^
      |                   ;
a.cc:24:3: error: expected primary-expression before 'for'
   24 |   for(i=1,i<=W,i++){
      |   ^~~
a.cc:22:4: error: expected ';' before 'for'
   22 |   }
      |    ^
      |    ;
   23 | 
   24 |   for(i=1,i<=W,i++){
      |   ~~~
a.cc:24:3: error: expected primary-expression before 'for'
   24 |   for(i=1,i<=W,i++){
      |   ^~~
a.cc:22:4: error: expected ')' before 'for'
   22 |   }
      |    ^
      |    )
   23 | 
   24 |   for(i=1,i<=W,i++){
      |   ~~~
a.cc:18:6: note: to match this '('
   18 |   for(i=1,i<=W,i++){
      |      ^
a.cc:24:19: error: expected ';' before ')' token
   24 |   for(i=1,i<=W,i++){
      |                   ^
      |                   ;
a.cc:34:1: error: expected primary-expression before 'return'
   34 | return 0;
      | ^~~~~~
a.cc:32:4: error: expected ';' before 'return'
   32 |   }
      |    ^
      |    ;
   33 | 
   34 | return 0;
      | ~~~~~~
a.cc:34:1: error: expected primary-expression before 'return'
   34 | return 0;
      | ^~~~~~
a.cc:32:4: error: expected ')' before 'return'
   32 |   }
      |    ^
      |    )
   33 | 
   34 | return 0;
      | ~~~~~~
a.cc:24:6: note: to match this '('
   24 |   for(i=1,i<=W,i++){
      |      ^
Language: C++

#include <bits/stdc++.h>
//#define int short
#define ld long double
#define pb push_back
#define pf push_front
#define ft first
#define sc second
#define all(v) v.begin(), v.end()
#pragma GCC oprimize("O3")
#pragma GCC target("popcnt")
using namespace std;
const int maxn = 102, inf = 2000;
char tab[maxn][maxn];
int dp[maxn][maxn];

void dfs(int d, int i, int d1, int i1, int deep) {
    dp[d1][i1] = min(dp[d1][i1], dp[d - 1][i] + 1);
    dp[d1][i1] = min(dp[d1][i1], dp[d][i - 1] + 1);
    if (deep <= 0) {
        return;
    }
    if (d > 1 && tab[d - 1][i] == '#') {
        dfs(d - 1, i, d1, i1, deep - 1);
    }
    if (i > 1 && tab[d][i - 1] == '#') {
        dfs(d, i - 1, d1, i1, deep - 1);
    }
}
signed main() {
    ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    int h, w;
    cin >> h >> w;
    for (int d = 1; d <= h; d++) {
        for (int i = 1; i <= w; i++) {
            cin >> tab[d][i];
        }
    }
    for (int d = 0; d <= h; d++) {
        for (int i = 0; i <= w; i++) {
            dp[d][i] = inf;
        }
    }
    dp[0][1] = 0;
    dp[1][0] = 0;
    int dep = 20;
    for (int d = 1; d <= h; d++) {
        for (int i = 1; i <= w; i++) {
            if (h - d <= 5 || w - i <= 5) {
                dep = 1000;
            }
            if (tab[d][i] == '.') {
                dp[d][i] = min(dp[d][i], dp[d - 1][i]);
                dp[d][i] = min(dp[d][i], dp[d][i - 1]);
            } else {
                dfs(d, i, d, i);
            }
        }
    }
    cout << dp[h][w];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:55:20: error: too few arguments to function 'void dfs(int, int, int, int, int)'
   55 |                 dfs(d, i, d, i);
      |                 ~~~^~~~~~~~~~~~
a.cc:16:6: note: declared here
   16 | void dfs(int d, int i, int d1, int i1, int deep) {
      |      ^~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int H,W;
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      
      

Compiler output:
a.cc: In function 'int main()':
a.cc:7:32: error: expected '}' at end of input
    7 |     for(int j = 0; j < W; j++){
      |                               ~^
a.cc:7:32: error: expected '}' at end of input
a.cc:6:29: note: to match this '{'
    6 |   for(int i = 0; i < H; i++){
      |                             ^
a.cc:7:32: error: expected '}' at end of input
    7 |     for(int j = 0; j < W; j++){
      |                                ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <stdio.h>

//深さ優先探索
void deep_ser(int, int,int [][100],int ,int,int);

int ans=10000;

int main() {
	int H, W;
	int i,j;
	char c;
	int a[][100];
	scanf("%d %d", &H, &W);
	for (i = 0; i < H; i++) {
		for (j = 0; j < W; j++) {
			scanf("%c", &c);
			if (c == '#')a[i][j] = 1;
			else a[i][j] = 0;
		}
	}
	deep_ser(0, 0, a, H, W, 0);
	printf("%d", ans);
	return 0;
}

void deep_ser(int x, int y,int a[][100],int H,int W,int count) {
	int ser;
	if (a[x][y] == 0)count++;
	if (x == W - 1 && y == H - 1) {
		if (count < ans)ans = count;
	}
	if (x == W - 1)deep_ser(x, y + 1, a, H, W, count);
	else if(y==H-1)deep_ser(x+1, y, a, H, W, count);
	else {
		deep_ser(x, y + 1, a, H, W, count);
		deep_ser(x + 1, y, a, H, W, count);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: storage size of 'a' isn't known
   12 |         int a[][100];
      |             ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define MAXN 105
using namespace std;
ll h,w,dp[MAXN][MAXN];
char mt[MAXN][MAXN];
int main(){
    cin>>h>>w;
    for (int i=1; i<=h; i++)
        for (int j=1; j<=w; j++)
            cin>>mt[i][j];
        
    if (mt[1][1]=='#') dp[1][1]=1;
    else dp[1][1]=0;
    for (int i=2; i<=w; i++) dp[1][i]=dp[1][i-1]+1*(ll)(mt[1][i]=='#' && mt[1][i-1]=='.');
    for (int i=2; i<=h; i++) dp[i][1]=dp[i-1][1]+1*(ll)(mt[i][1]=='#' && mt[i-1][1]=='.');
    for (int i=2; i<=h; i++)
        for (int j=2; j<=w; j++)
            dp[i][j]=min(dp[i-1][j]+1*(ll)(mt[i][j]=='#' && mt[i-1][j]=='.'),dp[i][j-1]+1*(ll)(mt[i][j]=='#' && mt[i][j-1]=='.'));
    
    for (int i=1; i<=h; i++){
        for (int j=1; j<=w; j++)
        //     cout<<dp[i][j]<<" ";
        // cout<<endl;
    }

    cout<<dp[h][w]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: expected primary-expression before '}' token
   25 |     }
      |     ^
Language: C++

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long int
// #define ll int128_t
#define ld long double
#define ff first
#define ss second
#define mp make_pair
#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define pb push_back
#define eb emplace_back
#define pii pair<int, int>
#define endl '\n'
#define all(x) x.begin(),x.end()
#define f(i,j,l) for(i=j;i<l;i++)
#define smax(a,b) a=max(a,b)
#if !defined(ONLINE_JUDGE)
#include "debugging.h"
#endif
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;
// erase,insert same as normal set

// int const mod = 7340033;
int const mod = 1e9+7;
int power(int a,int b,int m){
    int res = 1;
    while(b){
        if(b&1){
            res = res*a;
            res %= m;
        }
        a=a*a;
        a%=m;
        b=b/2;
    }
    return res;
}
 
int inverse(int x){
    return power(x,mod-2,mod);
}

int const N = 105;
int const inf = 2e16;
int a[N][N];
int dp[N][N][2];

void solve(){  
    int n,i,j,l,m,k;
    cin>>n>>m;
    for(i=1;i<=n;i++){
        for(j=1;j<=m;j++){
            char c; cin>>c;
            a[i][j] = (c=='.'?0:1);
        }
    }

    if(a[1][1] == 0){
        dp[1][1][0] = 0;
        dp[1][1][1] = inf;
    }
    else{
        dp[1][1][0] = inf;
        dp[1][1][1] = 1;
    }

    for(j=2;j<=m;j++){
        if(a[1][j] == 0){
            dp[1][j][0] = min(dp[1][j-1][0] , dp[1][j-1][1]);
            dp[1][j][1] = inf;
        }
        else{
            dp[1][j][0] = inf;
            dp[1][j][1] = min(dp[1][j-1][0] + 1 , dp[1][j-1][1]);
        }
    }

    for(i=2;i<=n;i++){
        if(a[i][1] == 0){
            dp[i][1][0] = min(dp[i-1][1][0] , dp[i-1][1][1]);
            dp[i][1][1] = inf;
        }
        else{
            dp[i][1][0] = inf;
            dp[i][1][1] = min(dp[i-1][1][0] + 1 , dp[i-1][1][1]);
        }
    }

    for(i=2;i<=n;i++){
        for(j=2;j<=m;j++){
            if(a[i][j] == 0){
                dp[i][j][0] = min(dp[i-1][j][0] , min( dp[i][j-1][0] , min( dp[i-1][j][1], dp[i][j-1][1] ) ) );
                dp[i][j][1] = inf;
            }
            else{
                dp[i][j][0] = inf;
                dp[i][j][1] = min(dp[i-1][j][1] , dp[i][j-1][1]);
                dp[i][j][1] = min(dp[i][j][1] , min(dp[i-1][j][0] + 1 , dp[i][j-1][0] + 1));
            }   
        }
    }

    int ans = min(dp[n][m][0] , dp[n][m][1]);

    cout<<ans<<endl;
}       


int32_t main(){
    IOS;
    int t;
    t = 1;
    // precompute();
    // cin>>t;
    for(int tt=1;tt<=t;tt++){
        solve();
    }
    return 0;
}

/*

*/

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

void perform() {
  int h, w; cin >> h >> w;
  int dp[h][w];
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      dp[i][j] = 0;
    }
  }
  for (int i = 0; i < h; i++) {
    string s; cin >> s;
    for (int j = 0; j < w; j++) {
      if (!i && !j) {
        dp[i][j] = 0;
      } else if (!j) {
        dp[i][j] = dp[i-1][j];
      } else if (!i) {
        dp[i][j] = dp[i][j-1];
      } else {
        dp[i][j] = min(dp[i-1][j], dp[i][j-1]);
      }
      if (s[j] == '#') dp[i][j]++;
    }
  }
  cout << dp[h-1][w-1] << endl;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll t = 1; //cin >> t;
  while (t--) {perform();}
}

Compiler output:
a.cc: In function 'void perform()':
a.cc:2:13: error: 'cin' was not declared in this scope
    2 |   int h, w; cin >> h >> w;
      |             ^~~
a.cc:10:5: error: 'string' was not declared in this scope
   10 |     string s; cin >> s;
      |     ^~~~~~
a.cc:10:22: error: 's' was not declared in this scope
   10 |     string s; cin >> s;
      |                      ^
a.cc:19:20: error: 'min' was not declared in this scope
   19 |         dp[i][j] = min(dp[i-1][j], dp[i][j-1]);
      |                    ^~~
a.cc:24:3: error: 'cout' was not declared in this scope
   24 |   cout << dp[h-1][w-1] << endl;
      |   ^~~~
a.cc:24:27: error: 'endl' was not declared in this scope
   24 |   cout << dp[h-1][w-1] << endl;
      |                           ^~~~
a.cc: In function 'int main()':
a.cc:28:3: error: 'ios_base' has not been declared
   28 |   ios_base::sync_with_stdio(false);
      |   ^~~~~~~~
a.cc:29:3: error: 'cin' was not declared in this scope
   29 |   cin.tie(NULL);
      |   ^~~
a.cc:29:11: error: 'NULL' was not declared in this scope
   29 |   cin.tie(NULL);
      |           ^~~~
a.cc:1:1: note: 'NULL' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | void perform() {
a.cc:30:3: error: 'll' was not declared in this scope
   30 |   ll t = 1; //cin >> t;
      |   ^~
a.cc:31:10: error: 't' was not declared in this scope
   31 |   while (t--) {perform();}
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
struct node{
	int s,x,y;
};
int minv=0x3fff;
char a[1001][1001],b[1001][1001];
int n,m;
queue<node>q;
int main(){
	cin>>n>>m;
	for(int i=0;i<n;i++){
		for(int j=0;j<m;j++){
			cin>>a[i][j];
			if(a[i][j]=='.')b[i][j]=0;else b[i][j]=1;
		}
	}
	node e,t;
	e.s=b[0][0];
	e.x=0;
	e.y=0;
	q.push(e);
	while(!q.empty()){
		e=q.front();
		q.pop();
		if(e.w==n-1&&e.y==m-1)minv=min(e.s,minv);
		t=e;t.s+=b[e.x+1][e.y];t.x++;q.push(t);
		t=e;t.s+=b[e.x][e.y+1];t.y++;q.push(t);
	}
	cout<<minv;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: 'struct node' has no member named 'w'
   26 |                 if(e.w==n-1&&e.y==m-1)minv=min(e.s,minv);
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace sdt;
int main()
{
	cout<<"0";
	return 0;
 } 

Compiler output:
a.cc:2:17: error: 'sdt' is not a namespace-name
    2 | using namespace sdt;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |         cout<<"0";
      |         ^~~~
      |         std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.StringTokenizer;

public class A {

	public static void main(String[] args) {
		FastScanner fs=new FastScanner();
		int h=fs.nextInt(), w=fs.nextInt();
		boolean[][] board=new boolean[w][h];
		for (int y=0; y<h; y++) {
			char[] line=fs.next().toCharArray();
			for (int x=0; x<w; x++) board[x][y]=line[x]=='#';
		}
		int[] dx= {1, 0}, dy= {0, 1};
		ArrayDeque<Integer> xs=new ArrayDeque<>(), ys=new ArrayDeque<>();
		int[][] dist=new int[w][h];
		for (int x=0; x<w; x++) Arrays.fill(dist[x], Integer.MAX_VALUE/2);
		dist[0][0]=board[0][0]?1:0;
		xs.add(0); ys.add(0);
		while (!xs.isEmpty()) {
			int x=xs.removeFirst(), y=ys.removeFirst();
			for (int d=0; d<2; d++) {
				int nx=x+dx[d], ny=y+dy[d];
				if (nx>=w||ny>=h) continue;
				int cost=(!board[x][y]&&board[nx][ny]?1:0);
				if (dist[nx][ny]<=dist[x][y]+cost) continue;
				dist[nx][ny]=dist[x][y]+cost;
				if (cost==0) {
					xs.addFirst(nx);
					ys.addFirst(ny);
				}
				else {
					xs.addLast(nx);
					ys.addLast(ny);
				}
			}
		}
		System.out.println(dist[w-1][h-1]);
	}

	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");

		public String next() {
			while (!st.hasMoreElements())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) {
				a[i]=nextInt();
			}
			return a;
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

	}

}


Compiler output:
Main.java:8: error: class A is public, should be declared in a file named A.java
public class A {
       ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define il inline
#define re register
#define Rep(i, s, e) for (re int i = s; i <= e; ++i)
#define Dep(i, s, e) for (re int i = s; i >= e; --i)
#define file(a) freopen(#a".in", "r", stdin), freopen(#a".out", "w", stdout)

const int N = 110;

il int read() {
    int x = 0; bool f = true; char c = getchar();
    while (c < '0' || c > '9') {if (c == '-') f = false; c = getchar();}
    while (c >= '0' && c <= '9') x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
    return f ? x : -x;
}

int n, m;
char s[N][N];
int dp[N][N];

int main() {
    n = read(), m = read();
    Rep(i, 1, n) gets(s[i] + 1);
    Rep(i, 2, n) dp[i][0] = 0x3f3f3f3f;
    Rep(i, 2, m) dp[0][i] = 0x3f3f3f3f;
    Rep(i, 1, n) {
        Rep(j, 1, m) {
            dp[i][j] = min(dp[i - 1][j], dp[i][j - 1]) + (s[i][j] == '#');
        }
    }
    printf("%d", dp[n][m]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   26 |     Rep(i, 1, n) gets(s[i] + 1);
      |         ^
a.cc:7:34: note: in definition of macro 'Rep'
    7 | #define Rep(i, s, e) for (re int i = s; i <= e; ++i)
      |                                  ^
a.cc:26:18: error: 'gets' was not declared in this scope; did you mean 'getw'?
   26 |     Rep(i, 1, n) gets(s[i] + 1);
      |                  ^~~~
      |                  getw
a.cc:27:9: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   27 |     Rep(i, 2, n) dp[i][0] = 0x3f3f3f3f;
      |         ^
a.cc:7:34: note: in definition of macro 'Rep'
    7 | #define Rep(i, s, e) for (re int i = s; i <= e; ++i)
      |                                  ^
a.cc:28:9: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   28 |     Rep(i, 2, m) dp[0][i] = 0x3f3f3f3f;
      |         ^
a.cc:7:34: note: in definition of macro 'Rep'
    7 | #define Rep(i, s, e) for (re int i = s; i <= e; ++i)
      |                                  ^
a.cc:29:9: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   29 |     Rep(i, 1, n) {
      |         ^
a.cc:7:34: note: in definition of macro 'Rep'
    7 | #define Rep(i, s, e) for (re int i = s; i <= e; ++i)
      |                                  ^
a.cc:30:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   30 |         Rep(j, 1, m) {
      |             ^
a.cc:7:34: note: in definition of macro 'Rep'
    7 | #define Rep(i, s, e) for (re int i = s; i <= e; ++i)
      |                                  ^
Language: C++

#include <iostream>
#include <cstring>
#include <cstdio>
#define maxn 105

using namespace std;

char s[maxn][maxn];
int dp[maxn][maxn],n,m;

int main()
{
    scanf("%d%d",&n,&m);
    for (int i=0;i<n;i++) scanf("%s",s[i]);

    for (int i=1;i<=n;i++)
        for (int j=1;j<=m;j++) if (s[i-1][j-1]=='#') dp[i][j]=1;
    else dp[i][j]=0;

    for (int i=1;i<=n;i++)
        for (int j=1;j<=m;j++)
        {
            if (i==1 && j==1) continue;
            if (i==1) dp[i][j]=dp[i][j]+dp[i][j-1];
            else if (j==1) dp[i][j]=dp[i][j]+dp[i-1][j];
            else dp[i][j]=dp[i][j]+min(dp[i-1][j],dp[i][j-1]);
        }
    printf("%d\n",dp[n][m]);
    return 0;
}
v

Compiler output:
a.cc:31:1: error: 'v' does not name a type
   31 | v
      | ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int r,c;
  cin >> r >> c;
  char a[r][c];
  for(int i=0;i<r;i++)
  {
    for(int j=0;j<c;j++)
      cin>>a[i][j];
  }
  int c = 0 , i = 0 , j = 0;
   
  while(i < r && j < c)
  {
   //down
   if(a[i+1][j] == '#') 
   {
    c++;
     i = i+1;
     j = j;
   }
    //right
   else if(a[i][j+1] == '#')
   {
    c++;
     i=i;
     j=j+1;
   }
  }
  
  cout << c << endl;
      
 return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: redeclaration of 'int c'
   14 |   int c = 0 , i = 0 , j = 0;
      |       ^
a.cc:6:9: note: 'int c' previously declared here
    6 |   int r,c;
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define repeat(i,a,b) for(int i=(a),_=(b);i<_;i++)
#define repeat_back(i,a,b) for(int i=(b)-1,_=(a);i>=_;i--)
#define mst(a,x) memset(a,x,sizeof(a))
#define qwq (cerr<<"qwq"<<endl)
#define orz(x) (cerr<<#x": "<<x<<endl)
#define orzarr(a,n) {cerr<<#a": "; repeat(__,0,n)cerr<<(a)[__]<<" "; cerr<<endl;}
#define orzeach(a) {cerr<<#a": "; for(auto __:a)cerr<<__<<" "; cerr<<endl;}
#define fi first
#define se second
typedef long long ll; const int inf=~0u>>2; const ll INF=~0ull>>2; ll read(){ll x; if(scanf("%lld",&x)==-1)exit(0); return x;}
typedef double lf; typedef long double llf; const lf err=1e-11; const lf pi=acos(-1); lf readf(){lf x; if(scanf("%lf",&x)==-1)exit(0); return x;} template<typename T> T sqr(const T &x){return x*x;}
typedef pair<int,int> pii; template<typename A,typename B> ostream &operator<<(ostream &o,const pair<A,B> &x){return o<<'('<<x.fi<<','<<x.se<<')';}
//mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
const int N=110;
const int mod=(1?1000000007:998244353); ll mul(ll a,ll b,ll m=mod){return a*b%m;} ll qpow(ll a,ll b,ll m=mod){ll ans=1; for(;b;a=mul(a,a,m),b>>=1)if(b&1)ans=mul(ans,a,m); return ans;} ll getinv(ll v,ll m=mod){return qpow(v,m-2,m);}
//#define int ll
char s[N][N];
int dp[N][N];
signed main(){
	//ios::sync_with_stdio(0); cin.tie(0);
	int n=read(),m=read();
	gets(s[0]);
	repeat(i,0,n)gets(s[i]);
	repeat(i,0,n)
	repeat(j,0,m){
		int &x=dp[i][j];
		x=(i+j==0?0:inf);
		if(i>0){
			x=min(x,dp[i-1][j]+(s[i][j]!=s[i-1][j]));
		}
		if(j>0){
			x=min(x,dp[i][j-1]+(s[i][j]!=s[i][j-1]));
		}
	}
	cout<<dp[n-1][m-1]/2+(s[0][0]=='#' || s[n-1][m-1]=='#');
	return 0;
}

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

#include<bits/stdc++.h>
#define _LIBCPP_DEBUG 0
using namespace std;
typedef long long int ll;
ll MOD = 1e9 + 7;
int INF = 1 << 20;

vector<vector<char>> MAP(102,vector<char>(102,'0'));
int H,W;
int dfs(int row, int col, int cnt){

    if(MAP[row][col]=='0') return H+W-1;

    if(MAP[row][col]=='#') cnt++;

    if(row==H&&col==W){
        return cnt;
    }else{
        int migi,sita;
        migi = dfs(row, col+1, cnt);
        sita = dfs(row+1, col, cnt);
        return min(migi,sita);
    }



}

int main(void){


    cin>>H>>W;

    for (int i = 1; i <= H; ++i) {
        for (int j = 1; j <= W; ++j) {
            cin>>MAP[i][j];
        }
    }
    cout<<dfs(1,1,0)<<endl;

    return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<bits/stdc++.h>
        ^
Main.java:2: error: illegal character: '#'
#define _LIBCPP_DEBUG 0
^
Main.java:4: error: class, interface, enum, or record expected
typedef long long int ll;
^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
ll MOD = 1e9 + 7;
^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: illegal start of type
vector<vector<char>> MAP(102,vector<char>(102,'0'));
                         ^
Main.java:8: error: class, interface, enum, or record expected
vector<vector<char>> MAP(102,vector<char>(102,'0'));
                                   ^
Main.java:9: error: class, interface, enum, or record expected
int H,W;
^
Main.java:32: error: not a statement
    cin>>H>>W;
          ^
Main.java:36: error: not a statement
            cin>>MAP[i][j];
               ^
Main.java:39: error: not a statement
    cout<<dfs(1,1,0)<<endl;
                    ^
Main.java:29: error: <identifier> expected
int main(void){
             ^
12 errors
Language: C++

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

int d[100][100];
int dx[2]={1,0},dy[2]={0a,1};
typedef pair<int,int> P;
typedef pair<int,P> IP;

signed main(){
  int h,w;cin>>h>>w;
  vector<string> s(h);
  for(int i=0;i<h;i++)cin>>s[i];
  priority_queue<IP,vector<IP>,greater<IP>> que;
  for(int i=0;i<h;i++)for(int j=0;j<w;j++)d[i][j]=100000000;
  d[0][0]=(s[0][0]=='#');
  que.push(IP(s[0][0]=='#',P(0,0)));
  while(que.size()){
    IP p=que.top();que.pop();
    int va=p.first,y=p.second.first,x=p.second.second;
    for(int i=0;i<2;i++){
      int Y=y+dy[i],X=x+dx[i];
      if(Y<0||Y>=h||X<0||X>=w)continue;
      int nv=va+(s[y][x]=='.'&&s[Y][X]=='#');
      if(d[Y][X]>nv){
        d[Y][X]=nv;que.push(IP(nv,P(Y,X)));
      }
    }
  }
  cout<<d[h-1][w-1]<<endl;
}


Compiler output:
a.cc:5:24: error: unable to find numeric literal operator 'operator""a'
    5 | int dx[2]={1,0},dy[2]={0a,1};
      |                        ^~