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

#include <iostream>
#include <vector>
#include <stack>

using namespace std;
const int MOD = 1000000007;

int dp[1010][1010];
char table[1010][1010];

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

    memset(dp, 0, sizeof(dp));

    for(int h=0; h<=H; ++h){
        table[h][0] = '.';
    }
    for(int w=0; w<=W; ++w){
        table[0][w] = '.';
    }

    for(int h=1; h<=H; ++h){
        for(int w=1; w<=W; ++w){
            cin >> table[h][w];
        }
    }
    dp[1][1]=1;

    for(int h=1; h<=H; ++h){
        for(int w=1; w<=W; ++w){
            if( table[h-1][w] != '#' && table[h][w-1] != '#' ){
                dp[h][w] += dp[h-1][w] + dp[h][w-1];
                dp[h][w] %= MOD;
            }else if( table[h-1][w] == '#' && table[h][w-1] != '#' ){
                dp[h][w] += dp[h][w-1];
                dp[h][w] %= MOD;
            }else if( table[h-1][w] != '#' && table[h][w-1] == '#' ){
                dp[h][w] += dp[h-1][w];
                dp[h][w] %= MOD;
            }else{
                dp[h][w] = 0;
                dp[h][w] %= MOD;
            }
        }
    }

    cout << dp[H][W] << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'memset' was not declared in this scope
   15 |     memset(dp, 0, sizeof(dp));
      |     ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <stack>
  +++ |+#include <cstring>
    4 |
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
     int n,m;
  cin>>n>>m;
  int dp[n][m]={0};
  char c[n][m];
  for(int i=0;i<n;i++)
    for(int j=0;j<m;j++)
      cin>>c[i][j];
  int flag=0
  for(int i=1;i<n;i++)
  { if(c[i][j]='.')dp[i][0]=1;else break;}
  for(int i=1;i<m;i++){if(c[i][j]='.')dp[0][i]=1;else break;}
  for(int i=1;i<n;i++)
  {
    for(int j=1;j<m;j++)
    {
      if(a[i][j]=='.')dp[i][j]=dp[i][j-1]+dp[i-1][j];
    }
  }cout<<dp[n-1][m-1]<<endl;
}
  
 

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: expected ',' or ';' before 'for'
   13 |   for(int i=1;i<n;i++)
      |   ^~~
a.cc:13:15: error: 'i' was not declared in this scope
   13 |   for(int i=1;i<n;i++)
      |               ^
a.cc:15:32: error: 'j' was not declared in this scope
   15 |   for(int i=1;i<m;i++){if(c[i][j]='.')dp[0][i]=1;else break;}
      |                                ^
a.cc:20:10: error: 'a' was not declared in this scope
   20 |       if(a[i][j]=='.')dp[i][j]=dp[i][j-1]+dp[i-1][j];
      |          ^
Language: C++

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

int main()
{
  int a,b;
  cin >>a>>b;
  char arr[a][b];
  int i,j;
  for(i=0;i<a;i++)
    for(j=0;j<b;j++)
      cin <<arr[i][j];
  int dp[a+1][b+1];
  for(i=0;i<=b;i++)
    dp[0][i]=0;
  for(i=0;i<=a;i++)
    dp[i][0]=0;
  int flag=0;
  for(i=1;i<=b;i++)
  {
    if(flag==1)
      dp[1][i]=0;
    else
    {
      if(arr[0][i-1]=='#')
      {
         dp[1][i]=0;
        flag=1;
        continue;
      }
      else
      {
        dp[1][i]=1;
      }
    }
  }
  for(i=2;i<=a;i++)
  {
    for(j=1;j<=b;j++)
    {
      if(arr[i-1][j-1]=='#')
      dp[i][j]=0;
      else
      {
        dp[i][j]=(dp[i][j-1]+dp[i-1][j])%1000000007;
      }
    }
    
  }
  cout <<dp[a][b]<<endl;
  
}

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

#include<bits/stdc++.h>
using namespace std;
int mat[1001][1001];
long long dp[1001][1001];
long long ways(int rind,int cind,int N,int M){
if(rind==N&&cind==M)
  return 1;
  if(dp[rind][cind]!=-1)
  return dp[rind][cind];
  long long rightcount=0;
  long long dcount=0;
  if(rind+1<=N&&mat[rind+1][cind])
    rightcount=ways(rind+1,cind,N,M);
    if(cind+1<=M&&mat[rind][cind+1])
    dcount=ways(rind,cind+1,N,M);
  dp[rind][cind]=rightcount+dcount;
  return dp[rind][cind];
}
int main(){
  memset(dp,-1,sizeof(dp));
  int M,N;
  cin>>M>>N;
  for(int i=1;i<=N;i++){
  for(int j=1;j<=M;j++){
  char c;
    cin>>c;
    if(c=='.')
      mat[i][j]=1;
    else
      mat[i][j]=0;
  }
  }
  cout<<ways(1,1,N,M)%(1e9+7);
  
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:22: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   33 |   cout<<ways(1,1,N,M)%(1e9+7);
      |         ~~~~~~~~~~~~~^~~~~~~~
      |             |             |
      |             long long int double
Language: C++

#inclue<bits/stdc++.h>
using namespace std;
int mat[1001][1001];
long long dp[1001][1001];
long long ways(int rind,int cind,int N,int M){
if(rind==N&&cind==M)
  return 1;
  if(dp[rind][cind]!=-1)
  return dp[rind][cind];
  long long rightcount=0;
  long long dcount=0;
  if(rind+1<=N&&mat[rind+1][cind])
    rightcount=ways(rind+1,cind,N,M);
    if(cind+1<=M&&mat[rind][cind+1])
    dcount=ways(rind,cind+1,N,M);
  dp[rind][cind]=rightcount+dcount;
  return dp[rind][cind];
}
int main(){
  memset(dp,-1,sizeof(dp));
  int M,N;
  cin>>M>>N;
  for(int i=1;i<=N;i++){
  for(int j=1;j<=M;j++){
  char c;
    cin>>c;
    if(c=='.')
      mat[i][j]=1;
    else
      mat[i][j]=0;
  }
  }
  cout<<ways(1,1,N,M)%(1e9+7);
  
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:20:3: error: 'memset' was not declared in this scope
   20 |   memset(dp,-1,sizeof(dp));
      |   ^~~~~~
a.cc:1:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | #inclue<bits/stdc++.h>
a.cc:22:3: error: 'cin' was not declared in this scope
   22 |   cin>>M>>N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclue<bits/stdc++.h>
a.cc:33:3: error: 'cout' was not declared in this scope
   33 |   cout<<ways(1,1,N,M)%(1e9+7);
      |   ^~~~
a.cc:33:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:22: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   33 |   cout<<ways(1,1,N,M)%(1e9+7);
      |         ~~~~~~~~~~~~~^~~~~~~~
      |             |             |
      |             long long int double
Language: C++

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

const int H=1e3+5, W=1e3+5, MODULO=1e9+7;
int w,h;
char map[H][W];
long long dp[H][W];

bool isValid(int i, int j){
    return i>0&&j>0&&i<=h&&j<=w&&map[i][j]=='.';
}

long long solve(int i, int j){
    if(i==h && j==w)
        return 1;
    long long &ret=dp[i][j];
     if(~ret) return ret;
    ret=0;
    if(isValid(i,j)){
        map[i][j]='x';
        if(isValid(i+1,j)) ret+=solve(i+1,j)%MODULO;
        if(isValid(i,j+1)) ret+=solve(i,j+1)%MODULO;
        map[i][j]='.';

    }
    return ret;
}

int main(){
    // freopen("out.txt","wt",stdout);
    memset(dp, -1, sizeof dp);
    scanf("%d %d", &h, &w);
    for (int i = 1; i <= h; ++i)
    {
        cin.ignore();
        for (int j = 1; j <= w; ++j)
        {
            scanf("%c", &map[i][j]);
        }
    }
    int b=0;
    printf("%lld\n", solve(1,1)%MODULO);
    return 0;
}

Compiler output:
a.cc: In function 'bool isValid(int, int)':
a.cc:10:34: error: reference to 'map' is ambiguous
   10 |     return i>0&&j>0&&i<=h&&j<=w&&map[i][j]=='.';
      |                                  ^~~
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:6:6: note:                 'char map [1005][1005]'
    6 | char map[H][W];
      |      ^~~
a.cc: In function 'long long int solve(int, int)':
a.cc:20:9: error: reference to 'map' is ambiguous
   20 |         map[i][j]='x';
      |         ^~~
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:6:6: note:                 'char map [1005][1005]'
    6 | char map[H][W];
      |      ^~~
a.cc:23:9: error: reference to 'map' is ambiguous
   23 |         map[i][j]='.';
      |         ^~~
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:6:6: note:                 'char map [1005][1005]'
    6 | char map[H][W];
      |      ^~~
a.cc: In function 'int main()':
a.cc:38:26: error: reference to 'map' is ambiguous
   38 |             scanf("%c", &map[i][j]);
      |                          ^~~
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:6:6: note:                 'char map [1005][1005]'
    6 | char map[H][W];
      |      ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
bool isvalid(int x,int y,int row,int col)
{
    if(x>=0&&y>=0&&x<row&&y<col)
    {
        return true;
    }
    return false;
}
int main()
{
    ll row,col;
    cin>>row>>col;
    vector<vector<char>> grid(row,vector<char>(col));
    for(int i=0;i<row;i++)
    {
        for(int j=0;j<col;j++)
        {
            cin>>grid[i][j];
        }
    }
    vector<vector<ll>> dp(row,vector<ll>(col));
    for(int i=0;i<col;i++)
    {
        if(grid[0][i]=='.')
        {
            dp[0][i]=1;
        }
        else
        {
            dp[0][i]=0;
        }
    }
    for(int i=0;i<row;i++)
    {
        if(grid[i][0]=='.')
        {
            dp[i][0]=1;
        }
        else
        {
            dp[i][0]=1;
        }
    }
    for(int i=1;i<row;i++)
    {
        for(int j=1;j<col;j++)
        {
            if(grid[i][j]!='#')
            {
                if(isvalid(i-1,j,row,col))
                {
                    dp[i][j]=(dp[i][j]%1000000007+dp[i-1][j]%1000000007)%1000000007;
                }
                if(isvalid(i,j-1,row,col))
                {
                    dp[i][j]=dp[i][j]%1000000007+dp[i][j-1]%1000000007);
                }
            }
        }
    }
    cout<<dp[row-1][col-1];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:71: error: expected ';' before ')' token
   59 |                     dp[i][j]=dp[i][j]%1000000007+dp[i][j-1]%1000000007);
      |                                                                       ^
      |                                                                       ;
Language: C++

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

vector<string> a;

int dp[1010][1010]={0};

int add(int* a, int b){
  a += b;
}

int main(){
  int h, w;
  cin >> h >> w;
  for(int i=0;i<h;i++){
    cin >> a[i];
  }
  dp[0][0] = 1;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(a[i+1][j]=='.'&&i+1<h){
        add(dp[i+1][j], dp[i][j]);
      }
      if(a[i][j+1]=='.'&&j+1<w)){
        add(dp[i][j+1], dp[i][j]);
      }
    }
  }
  cout << dp[i][j] % 1000000007 << endl;
  
}

Compiler output:
a.cc: In function 'int add(int*, int)':
a.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^
a.cc: In function 'int main()':
a.cc:23:22: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   23 |         add(dp[i+1][j], dp[i][j]);
      |             ~~~~~~~~~^
      |                      |
      |                      int
a.cc:9:14: note:   initializing argument 1 of 'int add(int*, int)'
    9 | int add(int* a, int b){
      |         ~~~~~^
a.cc:25:32: error: expected primary-expression before ')' token
   25 |       if(a[i][j+1]=='.'&&j+1<w)){
      |                                ^
a.cc:30:14: error: 'i' was not declared in this scope
   30 |   cout << dp[i][j] % 1000000007 << endl;
      |              ^
a.cc:30:17: error: 'j' was not declared in this scope
   30 |   cout << dp[i][j] % 1000000007 << endl;
      |                 ^
Language: C++

//#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
const long long INF= 1e+18+1;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll> >vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
const ll MOD=1000000007LL;
string abc="abcdefghijklmnopqrstuvwxyz";
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int main(){
  ll h,w;cin>>h>>w;
  vector<string>a(h);
  rep(i,h)cin>>a[i];
  ll dp[h][w];
  rep(i,h){
    rep(j,w)dp[i][j]=0;
  }
  dp[0][0]=1;
  for(ll i=0;i<h;i++){
    for(ll j=0;j<w;j++){
      if(a[i][j]=='#')continue;
      if(i>=1)dp[i][j]+=dp[i-1][j];
      if(j>=1)dp[i][j]+=dp[i][j-1];
      dp[i][j]%=MOD;
    }
  }
  //rep(i,h){
    //rep(j,w)cout<<dp[i][j]<<" ";
    //cout<<endl;
  }
  cout<<dp[h-1][w-1]<<endl;
}

Compiler output:
a.cc:36:3: error: 'cout' does not name a type
   36 |   cout<<dp[h-1][w-1]<<endl;
      |   ^~~~
a.cc:37:1: error: expected declaration before '}' token
   37 | }
      | ^
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t

#define ROW_MAX 1000
#define COL_MAX ROW_MAX
#define BUF_SIZE (ROW_MAX+20)

// size: specify sizeof(str)
int get_str(char *str, int size) {
    if(!fgets(str, size, stdin)) return -1;
    return 0;
}

int get_int2(int *a1, int *a2) {
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return -1;
  sscanf(line, "%d %d", a1, a2);
#else
#error
#endif
  return 0;
}

struct point2d {
    int row;
    int col;
};

struct point2d dist[4] = {
    {0, 1}, // right direction
    {1, 0}, // bottom direction
};

static char map[ROW_MAX+1][COL_MAX+1];
static char outd[ROW_MAX+1][COL_MAX+1]; // outdegree
static uint64_t ans[ROW_MAX+1][COL_MAX+1];
#define DIVISOR 1000000007

void dfs(struct point2d p, uint64_t cnt) {
    ans[p.row][p.col] = (ans[p.row][p.col]+cnt)%DIVISOR;
#ifdef DEBUG
    printf("(%d %d) -> %d [prev_dst: %d]\n", p.row, p.col, (int)ans[p.row][p.col], outd[p.row][p.col]);
#endif
    int i;
    // wait until all previous path were analyzed
    if(outd[p.row][p.col]) return;
    // no longer needed
    map[p.row][p.col] = 0;
    for(i = 0; i < 2; i++) {
        struct point2d np = {
            p.row + dist[i].row,
            p.col + dist[i].col
        };
        if(map[np.row][np.col]) {
            outd[np.row][np.col]--;
            dfs(np, ans[p.row][p.col]);
        }
    }
}

int main(void) {
    int row, col;
    static char buf[BUF_SIZE];
    get_int2(&row, &col);
    int i, j;
    for(i = 1; i <= row; i++) {
        get_str(&buf[1], BUF_SIZE-1);
        for(j = 1; j <= col; j++) {
            map[i][j] = buf[j] == '.';
        }
    }
    for(i = 1; i <= row; i++) {
        for(j = 1; j <= col; j++) {
        }
    }
    // delete unused mass
    for(i = 1; i <= row; i++) {
        for(j = 1; j <= col; j++) {
            // assume that (1,1) should be empty.
            if(i==1 && j==1) continue;
            int cnt = 0;
            if(i!=1 && map[i-1][j]) cnt++;
            if(j!=1 && map[i][j-1]) cnt++;
            if(cnt==0) map[i][j]=0;
            dst_cnt[i][j] = cnt;
        }
    }
    struct point2d start = {1, 1};
    dfs(start, 1);
    printf("%d\n", (int)ans[row][col]);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:88:13: error: 'dst_cnt' undeclared (first use in this function)
   88 |             dst_cnt[i][j] = cnt;
      |             ^~~~~~~
main.c:88:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t

#define ROW_MAX 1000
#define COL_MAX ROW_MAX
#define BUF_SIZE (ROW_MAX+20)

// size: specify sizeof(str)
int get_str(char *str, int size) {
    if(!fgets(str, size, stdin)) return -1;
    return 0;
}

int get_int2(int *a1, int *a2) {
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return -1;
  sscanf(line, "%d %d", a1, a2);
#else
#error
#endif
  return 0;
}

struct point2d {
    int row;
    int col;
};

struct point2d dist[4] = {
    {0, 1}, // right direction
    {1, 0}, // bottom direction
};

static char map[ROW_MAX+1][COL_MAX+1];
static char outd[ROW_MAX+1][COL_MAX+1];
static uint64_t ans[ROW_MAX+1][COL_MAX+1];
#define DIVISOR 1000000007

void dfs(struct point2d p, uint64_t cnt) {
    ans[p.row][p.col] = (ans[p.row][p.col]+cnt)%DIVISOR;
#ifdef DEBUG
    printf("(%d %d) -> %d [prev_dst: %d]\n", p.row, p.col, (int)ans[p.row][p.col], dst_cnt[p.row][p.col]);
#endif
    int i;
    // wait until all previous path were analyzed
    if(outd[p.row][p.col]) return;
    // no longer needed
    map[p.row][p.col] = 0;
    for(i = 0; i < 2; i++) {
        struct point2d np = {
            p.row + dist[i].row,
            p.col + dist[i].col
        };
        if(map[np.row][np.col]) {
            outd[np.row][np.col]--;
            dfs(np, ans[p.row][p.col]);
        }
    }
}

int main(void) {
    int row, col;
    static char buf[BUF_SIZE];
    get_int2(&row, &col);
    int i, j;
    for(i = 1; i <= row; i++) {
        get_str(&buf[1], BUF_SIZE-1);
        for(j = 1; j <= col; j++) {
            map[i][j] = buf[j] == '.';
        }
    }
    for(i = 1; i <= row; i++) {
        for(j = 1; j <= col; j++) {
        }
    }
    // delete unused mass
    for(i = 1; i <= row; i++) {
        for(j = 1; j <= col; j++) {
            // assume that (1,1) should be empty.
            if(i==1 && j==1) continue;
            int cnt = 0;
            if(i!=1 && map[i-1][j]) cnt++;
            if(j!=1 && map[i][j-1]) cnt++;
            if(cnt==0) map[i][j]=0;
            dst_cnt[i][j] = cnt;
        }
    }
    struct point2d start = {1, 1};
    dfs(start, 1);
    printf("%d\n", (int)ans[row][col]);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:88:13: error: 'dst_cnt' undeclared (first use in this function)
   88 |             dst_cnt[i][j] = cnt;
      |             ^~~~~~~
main.c:88:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main()
{
  int h,w;
  cin>>h>>w;
  vector<vector<char>>x;
  int i,j;
  char ans;
  for(i=0;i<h;i++)
  {
    vector<char>y;
    for(j=0;j<w;j++)
    {     
      cin>>ans;
      y.push_back(ans);
    }
    x.push_back(y);
  }
  int dp[h][w]={0};
  dp[0][0]=1;
  
  for(i=1;i<w;i++)
  {
    if(x[0][i]=='.')
      dp[0][i]=1;
    else
     	break;
  }
  for(;i<w;i++)
      dp[0][i]=0;
  
  for(i=1;i<h;i++)
  {
    if(x[i][0]=='.')
      dp[i][0]=1;
    else
      break;  
  }
  for(;i<h;i++)
    dp[0][i]=0;
  
  for(i=1;i<h;i++)
  {
    for(j=1;j<w;j++)
    {
      if(x[i][j]=='.')
        dp[i][j]+=(dp[i-1][j]%(1e9+7)+dp[i][j-1]%(1e9+7));
      else
        dp[i][j]=0;
    }
  }
  cout<<dp[h-1][w-1]<<"\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:30: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   49 |         dp[i][j]+=(dp[i-1][j]%(1e9+7)+dp[i][j-1]%(1e9+7));
      |                    ~~~~~~~~~~^~~~~~~~
      |                             |     |
      |                             int   double
a.cc:49:49: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   49 |         dp[i][j]+=(dp[i-1][j]%(1e9+7)+dp[i][j-1]%(1e9+7));
      |                                       ~~~~~~~~~~^~~~~~~~
      |                                                |     |
      |                                                int   double
Language: C++

import java.util.*;
import java.lang.*;
import java.io.*;
 
public final class Main
{
    public static void main (String[] args) throws java.lang.Exception {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m =  in.nextInt();
        long[][] arr= new long[n][m];
        for(int i =0; i< n; i++) {
           for(int j =0; j< m ; j++) {
              String c = in.next();
              if(c=="#"){
                arr[i][j]  =-1;
              }
           }
        }
        
      for(int i =0; i< n; i++) {
           for(int j =0; j< m ; j++) {
              if(arr[i][j]!=-1) {
                 if(i-1>=0 && j-1>=0 && arr[i-1][j]!=-1 && arr[i][j-1]!=-1) 
                   arr[i][j] = arr[i-1][j] + arr[i][j-1];
                  else if(i-1<0 && j-1>=0 && arr[i][j-1] !=-1) {
                    arr[i][j] =arr[i][j-1];
                  } else if(j-1<0 && i-1>=0 && arr[i-1][j]!=-1){
                    arr[i][j] = arr[i-1][j]; 
                  } else {
                    arr[i][j] =0;
                  }
              }
           }
        }
      
        System.out.println(arr[n][m]%1000000007); 
        
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.lang.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public final class Main
      | ^~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#define nax 1000
typedef  long long lld;

int main(){
	int h , w;
	char grid[nax][nax];
	lld dp[nax][nax];
	scanf("%i%i",&h,&w);
	for(int i=0;i<h;i++){
		scanf(" %s",grid[i]);
	}
	dp[0][0] = 1;
	for(int i=0;i<h;i++){
		for(int j=0;j<w;j++){
			if((j-1>=0) || (i-1>=0)){
				if((j-1) >=0){
					if (grid[i][j] == '#'){
						continue;
					}
					dp[i][j]+= dp[i][j-1];
				}
				if((i-1) >=0){
					if(grid[i][j]=='#'){
						continue;
					}
					dp[i][j] += dp[i-1][j];
				}
			}
		}
	}
printf("%lld",dp[h-1][w-1]%1000000007LL);


Compiler output:
main.c: In function 'main':
main.c:33:1: error: expected declaration or statement at end of input
   33 | printf("%lld",dp[h-1][w-1]%1000000007LL);
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define all(v) (v).begin(), (v).end()
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define print(i) std::cout << (i) << '\n'
inline long long ceildiv(long long a, long long  b) { return (a+b-1)/b; }
typedef pair<long long,long long> P;
const long long inf = 10e7;
//int |x|<=2*10**9     long |x|<= 9*10**18
#define ll long long
ll dp[1005][1005];
char maze[1005][1005];
const long long mod = 1000000007;
int main(){
int h,w ;cin>>h>>w;
rep(i,h){maze[i][0]='#';maze[h][w+1]='#';string s;cin>>s;rep(j,w){maze[i+1][j+1]=s[j];}}
for(int y:{0,w+1}){rep(j,w+2){maze[y][j]='#';}}
rep(i,h){rep(j,w){if (maze[i+1][j+1]=='.'){if (i==0&&j==0){dp[1][1]=1;}else{dp[i+1][j+1]=dp[i+1][j]+dp[i][j+1];dp[i+1][j+1]%=mod;}
else{dp[i+1][j+1]=0;}}}}
print(dp[h][w]%mod);}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:1: error: expected '}' before 'else'
   19 | else{dp[i+1][j+1]=0;}}}}
      | ^~~~
a.cc:18:43: note: to match this '{'
   18 | rep(i,h){rep(j,w){if (maze[i+1][j+1]=='.'){if (i==0&&j==0){dp[1][1]=1;}else{dp[i+1][j+1]=dp[i+1][j]+dp[i][j+1];dp[i+1][j+1]%=mod;}
      |                                           ^
a.cc: At global scope:
a.cc:5:23: error: 'cout' in namespace 'std' does not name a type
    5 | #define print(i) std::cout << (i) << '\n'
      |                       ^~~~
a.cc:20:1: note: in expansion of macro 'print'
   20 | print(dp[h][w]%mod);}
      | ^~~~~
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
      |                  ^~~~
a.cc:20:21: error: expected declaration before '}' token
   20 | print(dp[h][w]%mod);}
      |                     ^
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Temp {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().trim().split("\\s+");
        int h = Integer.parseInt(s[0]);
        int w = Integer.parseInt(s[1]);
        int mod = (int) Math.pow(10, 9) + 7;
        char[][] arr = new char[h][w];
        for(int i = 0 ; i<h ; i++) {
            String temp = br.readLine().trim();
            for(int j=0 ; j<w ; j++)
                arr[i][j] = temp.charAt(j);
        }

        int[][] dp = new int[h][w];

        dp[h-1][w-1] = 1;

        for(int i=w-2 ; i>=0 ; i--)
        {
            if(arr[h-1][i] == '#')
                dp[h-1][i] = 0;
            else
                dp[h-1][i] = dp[h-1][i+1];
        }

        for(int i=h-2 ; i>=0 ; i--)
        {
            if(arr[i][w-1] == '#')
                dp[i][w-1] = 0;
            else
                dp[i][w-1] = dp[i+1][w-1];
        }

        for(int i=h-2 ; i>=0 ; i--)
        {
            for(int j=w-2 ; j>=0 ; j--)
            {
                if(arr[i][j] == '#')
                {
                    dp[i][j] = 0;
                    continue;
                }

                long temp = (long) dp[i+1][j] + dp[i][j+1];
                dp[i][j] = (int) (temp % mod);
            }
        }

        System.out.println(dp[0][0]);
    }
}

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

#include<bits/stdc++.h>
#define ll          long long int
#define ios        	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define M			1000000007
using namespace std;


int main() 
{   
  ios
    ll n,m ;
  cin>> n>> m ;
  ll dp[n][m] ;
  for(ll i=0;i<n;i++)
  {
    for(ll j=0;j<m;j++)
    {
    char s ;
    cin>> s ;
    if(s==".")
      dp[i][j]= 0 ;
      else
        dp[i][j]= INT_MIN ;
    }  
  }
  for(ll i=0;i<n;i++)
  {
    if(dp[i][0]!=INT_MIN)
      dp[i][0]=1 ;
  }
  for(ll i=0;i<m;i++)
  {
    if(dp[0][i]!=INT_MIN)
      dp[0][i]=1 ;
  }
  for(ll i=1;i<n;i++)
  {
    for(ll j=1; j<m;j++)
    {
      if(dp[i][j]==0)
      dp[i][j]= (max(dp[i-1][j],(ll)0)%M + max(dp[i][j-1],(ll)0)%M )%M
    }
  }
  cout<< dp[n-1][m-1] ;
  return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |     if(s==".")
      |        ~^~~~~
a.cc:42:5: error: expected ';' before '}' token
   42 |     }
      |     ^
Language: C++

/*===================*\
|ID : harryPotter_421  |
|      LANG: C++       |
\*====================*/
#include <iostream>
#include<bits/stdc++.h>
#define lli long long int
#define ld long double
#define pb push_back
#define M 1000000007
#define f(j,m,n) for(lli j=m;j<n;j++)
#define harry ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;
lli h,w;
char arr[1005][1005];
lli rec(lli i,lli j)
         {  
            if(i==w&&j==h)
              {
               
               return 1;
              }
        else
            {lli sum=0;
             if(arr[i+1][j]=='.')
                sum+=(rec(i+1,j)%M);
             if(arr[i][j+1]=='.')
                sum+=(rec(i,j+1)%M);
             
             return sum%M;
            }
         }
int main()
   {harry

    cin>>w>>h;

    for(lli i=1;i<=w;i++)
       {for(lli j=1;j<=h;j++)
         cin>>arr[i][j];}
    memset(dp,-1,sizeof(dp));
    cout<<rec(1,1);

    }

















Compiler output:
a.cc: In function 'int main()':
a.cc:41:12: error: 'dp' was not declared in this scope; did you mean 'dup'?
   41 |     memset(dp,-1,sizeof(dp));
      |            ^~
      |            dup
Language: C++

#include <bits/stdc++.h>

using namespace std;

const double PI = 3.141592653589;
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define pb push_back
#define mp make_pair
#define int long long
#define ll long long
#define all(c) (c).begin(),(c).end()
#define M 1000000007
#define INF LLONG_MAX
#define pr(...) dbs(#__VA_ARGS__, __VA_ARGS__)
template <class T> void dbs(string str, T t) {cerr << str << " : " << t << "\n";}
template <class T, class... S> void dbs(string str, T t, S... s) {int idx = str.find(','); cerr << str.substr(0, idx) << " : " << t << ", "; dbs(str.substr(idx + 1), s...);}
template <class S, class T>ostream& operator <<(ostream& os, const pair<S, T>& p) {return os << "(" << p.first << ", " << p.second << ")";}
template <class T>ostream& operator <<(ostream& os, const vector<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T> void prc(T a, T b) {cerr << "["; for (T i = a; i != b; ++i) {if (i != a) cerr << ", "; cerr << *i;} cerr << "]\n";}
// Use pr(a,b,c,d,e) or cerr<<anything or prc(v.begin(),v.end()) or prc(v,v+n)
//  

int h, w;
vector<string> v;
vector<vector<int>> vis;

const int MOD = (int)1e9 + 7;


int32_t main()
{
    fastio;
    //freopen("file.in", "r", stdin);
    //freopen("file.out", "w", stdout);
    cin >> h >> w;
    v.resize(h);
    vis.assign(h, vector<int>(w, 0));
    for(int i=0;i<h;i++) cin >> v[i];
    for(int i=h-1;i>=0;i--)
    {
        for(int j=w-1;h>=0;j--)
        {
            if(i == h-1 and j == w-1) vis[i][j]  = 1;
            if(
            if(v[i][j] == '#') continue;
            if(i+1 < h) vis[i][j] += vis[i+1][j];
            if(j+1 < w) vis[i][j] += vis[i][j+1];
            vis[i][j] %= MOD
        }
    }
    cout << vis[0][0] << "\n";
    return 0;
}



Compiler output:
a.cc: In function 'int32_t main()':
a.cc:47:13: error: expected primary-expression before 'if'
   47 |             if(v[i][j] == '#') continue;
      |             ^~
a.cc:48:13: error: expected primary-expression before 'if'
   48 |             if(i+1 < h) vis[i][j] += vis[i+1][j];
      |             ^~
a.cc:47:41: error: expected ')' before 'if'
   47 |             if(v[i][j] == '#') continue;
      |                                         ^
      |                                         )
   48 |             if(i+1 < h) vis[i][j] += vis[i+1][j];
      |             ~~                           
a.cc:46:15: note: to match this '('
   46 |             if(
      |               ^
a.cc:50:29: error: expected ';' before '}' token
   50 |             vis[i][j] %= MOD
      |                             ^
      |                             ;
   51 |         }
      |         ~
Language: C++

#include <bits/stdc++.h>
#define mod 1000000007

using namespace std;

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

    char arr[h][w];
    int dp[h+1][w+1]={0};

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

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

            if(i==0 or j==0) dp[i][j]=0;
            else{
                if(arr[i][j]=='.'){
                    dp[i][j]=(dp[i-1][j])%mod + (dp[i][j-1])%mod)
                }
                if(i==1 and j==1) dp[i][j]=1;
            }
        }
    }

    cout<<dp[h][w];
    /*for(int i=0; i<=h; i++){
        for(int j=0; j<=w; j++){
            cout<<dp[i][j]<<"  ";
        }
        cout<<"\n";
    }*/

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:65: error: expected ';' before ')' token
   25 |                     dp[i][j]=(dp[i-1][j])%mod + (dp[i][j-1])%mod)
      |                                                                 ^
Language: Java

import java.util.Scanner;

public class Grid1 {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		String[] fields = input.nextLine().split(" ");
		int H = Integer.parseInt(fields[0]);
		int W = Integer.parseInt(fields[1]);
		String[][] grid = new String[H][W];
		for (int i = 0; i < grid.length; i++) {
			String x = input.nextLine();
			for (int j = 0; j < x.length(); j++) {
				grid[i][j] = x.substring(j,j+1);
			}
		}
		System.out.println(uniquePathsWithObstacles(grid));
	}
	public static int uniquePathsWithObstacles(String[][] obstacleGrid) {
        int[][] dp = new int[obstacleGrid.length][obstacleGrid[0].length];
        int mod = 1000000007;
        if (obstacleGrid[0][0].equals("#")) return 0;
        dp[0][0] = 1;
        for (int i = 1; i < obstacleGrid.length; i++) {
        	if (!obstacleGrid[i][0].equals("#")) dp[i][0] = 1;
        	else break;
        }
        for (int i = 1; i < obstacleGrid[0].length; i++) {
        	if (!obstacleGrid[0][i].equals("#")) dp[0][i] = 1;
        	else break;
        }
        for (int i = 1; i < obstacleGrid.length; i++) {
        	for (int j = 1; j < obstacleGrid[0].length; j++) {
        		if (!obstacleGrid[i][j].equals("#")) dp[i][j] = dp[i-1][j]+dp[i][j-1];
        		else dp[i][j] = 0;
        		if (dp[i][j]>mod) dp[i][j]-=mod;
        	}
        }
		return dp[obstacleGrid.length-1][obstacleGrid[0].length-1];
    }
}

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

#include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define fore(i,a,b) for(int i=a;i<b;i++)
#define maxe(a,b,c) max(a,max(b,c))
#define pb push_back
#define eb emplace_back
#define em emplace
#define print(x) cout<<x<<endl;
typedef long long int ll;
const ll mod=1e9+7;
inline ll add(ll a, ll b){ ll c = a + b; if(c > MOD) c -= MOD; return c; }
int main()
{
    fastio;
    int h,w;
    cin>>h>>w;
    ll d[h][w]={0};
    char c[h][w];
    fore(i,0,h)
    {
        fore(j,0,w)
        cin>>c[i][j];
    }
    fore(i,0,h)
    {
        if(c[i][0]=='#')
        break;
        d[i][0]=1;
    }
    fore(i,0,w)
    {
        if(c[0][i]=='#')
        break;
        d[0][i]=1;
    }
    fore(i,1,h)
    {
        fore(j,1,w)
        {
            if(c[i][j]=='#')
            continue;
            else
            d[i][j]=add(d[i-1][j],d[i][j-1]);
        }
    }
    cout<<d[h-1][w-1];
}


Compiler output:
a.cc: In function 'll add(ll, ll)':
a.cc:12:49: error: 'MOD' was not declared in this scope
   12 | inline ll add(ll a, ll b){ ll c = a + b; if(c > MOD) c -= MOD; return c; }
      |                                                 ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define fore(i,a,b) for(int i=a;i<b;i++)
#define maxe(a,b,c) max(a,max(b,c))
#define pb push_back
#define eb emplace_back
#define em emplace
#define print(x) cout<<x<<endl;
typedef long long int ll;
const ll mod=1e9+7;
int main()
{
    fastio;
    int h,w;
    cin>>h>>w;
    ll d[h][w]={0};
    char c[h][w];
    fore(i,0,h)
    {
        fore(j,0,w)
        cin>>c[i][j];
    }
    fore(i,0,h)
    {
        if(c[i][0]=='#')
        break;
        d[i][0]=1;
    }
    fore(i,0,w)
    {
        if(c[0][i]=='#')
        break;
        d[0][i]=1;
    }
    fore(i,1,h)
    {
        fore(j,1,w)
        {
            if(c[i][j]=='#')
            continue;
            else
            d[i][j]=add(d[i-1][j],d[i][j-1]);
        }
    }
    cout<<d[h-1][w-1];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:21: error: 'add' was not declared in this scope; did you mean 'std::filesystem::perm_options::add'?
   43 |             d[i][j]=add(d[i-1][j],d[i][j-1]);
      |                     ^~~
      |                     std::filesystem::perm_options::add
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:219:7: note: 'std::filesystem::perm_options::add' declared here
  219 |       add       = 0x2,
      |       ^~~
Language: C++

// In the name of god
#include <bits/stdC++.h>
#pragma GCC optimize("02")
using namespace std;
const int mod=1e9+7;
const int maxn=1e3+5;
long long n,m,dp[maxn][maxn];
char c[maxn][maxn];
int main(){
	ios::sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	cin>>n>>m;
	dp[1][0]=1;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			cin>>c[i][j];
			if(i==1){
				if(c[i][j]=='.'){
					dp[i][j]=dp[i][j-1];
				}
			}
			else{
				if(c[i][j]=='.'){
					dp[i][j]=(dp[i][j-1]+dp[i-1][j])%mod;
				}
			}
		}
	}
	cout<<dp[n][m];
}


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

#include <bits/stdc++.h>
#include <fstream>

using namespace std;
#define intMax 1000000000000;
#define rep(i, a, b) for (long long i = a; i < b; i++)
#define repp(i, a, b) for (long long i = a; i >= b; i--)
#define be(a) (a.begin(), a.end())
#define rbe(p) (p.rbegin(), p.rend())
#define pb push_back

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n, m;
    cin >> n >> m;
    vector<vector<char>> A(n + 1, vector<char>(m + 1, '*'));

    rep(i, 0, n)
    {
        rep(j, 0, m)
        {
            cin >> A[i][j];
        }
    }
    if (A[0][0] == '*')
    {
        cout << 0;
        return 0;
    }
    vector<vector<long long>> dp(n + 1, vector<long long>(m + 1));
    dp[0][0] = 1;
    rep(i, 0, n)
    {
        rep(j, 0, m)
        {
            if (i - 1 >= 0 && j - 1 >= 0 && A[i][j] != '*')
            {
                dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
            }
            else if (i - 1 >= 0 && A[i][j] != '*')
            {
                dp[i][j] = dp[i - 1][j];
            }
            else if (j - 1 >= 0 && A[i][j] != '*')
            {
                dp[i][j] = dp[i][j - 1];
            }
            dp[i][j] %= 1000000007;
        }
    }
    // ddd({0, 0});
    // rep(i, 0, n)
    // {
    //     rep(j, 0, n)
    //     {
    //         cout << dp[i][j] << " ";
    //     }
    //     cout << endl;
    // }
    cout << dp[n - 1][m - 1];
}
#include <bits/stdc++.h>
#include <fstream>

using namespace std;
#define intMax 1000000000000;
#define rep(i, a, b) for (long long i = a; i < b; i++)
#define repp(i, a, b) for (long long i = a; i >= b; i--)
#define be(a) (a.begin(), a.end())
#define rbe(p) (p.rbegin(), p.rend())
#define pb push_back

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n, m;
    cin >> n >> m;
    vector<vector<char>> A(n + 1, vector<char>(m + 1, '*'));

    rep(i, 0, n)
    {
        rep(j, 0, m)
        {
            cin >> A[i][j];
        }
    }
    if (A[0][0] == '*')
    {
        cout << 0;
        return 0;
    }
    vector<vector<long long>> dp(n + 1, vector<long long>(m + 1));
    dp[0][0] = 1;
    rep(i, 0, n)
    {
        rep(j, 0, m)
        {
            if (i - 1 >= 0 && j - 1 >= 0 && A[i][j] != '*')
            {
                dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
            }
            else if (i - 1 >= 0 && A[i][j] != '*')
            {
                dp[i][j] = dp[i - 1][j];
            }
            else if (j - 1 >= 0 && A[i][j] != '*')
            {
                dp[i][j] = dp[i][j - 1];
            }
            dp[i][j] %= 1000000007;
        }
    }
    // ddd({0, 0});
    // rep(i, 0, n)
    // {
    //     rep(j, 0, n)
    //     {
    //         cout << dp[i][j] << " ";
    //     }
    //     cout << endl;
    // }
    cout << dp[n - 1][m - 1];
}

Compiler output:
a.cc:76:5: error: redefinition of 'int main()'
   76 | int main()
      |     ^~~~
a.cc:12:5: note: 'int main()' previously defined here
   12 | int main()
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#include <fstream>
 
using namespace std;
#define intMax 1000000000000;
#define rep(i, a, b) for (long long i = a; i < b; i++)
#define repp(i, a, b) for (long long i = a; i >= b; i--)
#define be(a) (a.begin(), a.end())
#define rbe(p) (p.rbegin(), p.rend())
#define pb push_back
 
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n;
    cin >> n;
    vector<vector<char>> A(n + 1, vector<char>(m + 1, '*'));
    
    rep(i, 0, n)
    {
        rep(j, 0, m)
        {
            cin >> A[i][j];
        }
    }
    if (A[0][0] == '*')
    {
        cout << 0;
        return 0;
    }
    vector<vector<long long>> dp(n + 1, vector<long long>(m + 1));
    dp[0][0] = 1;
    rep(i, 0, n)
    {
        rep(j, 0, m)
        {
            if (i - 1 >= 0 && j - 1 >= 0 && A[i][j] != '*')
            {
                dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
            }
            else if (i - 1 >= 0 && A[i][j] != '*')
            {
                dp[i][j] = dp[i - 1][j];
            }
            else if (j - 1 >= 0 && A[i][j] != '*')
            {
                dp[i][j] = dp[i][j - 1];
            }
            dp[i][j] %= 1000000007;
        }
    }
    // ddd({0, 0});
    // rep(i, 0, n)
    // {
    //     rep(j, 0, n)
    //     {
    //         cout << dp[i][j] << " ";
    //     }
    //     cout << endl;
    // }
    cout << dp[n - 1][m - 1];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:48: error: 'm' was not declared in this scope
   19 |     vector<vector<char>> A(n + 1, vector<char>(m + 1, '*'));
      |                                                ^
Language: C++

 #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cctype>
#include <cassert>
#include <climits>
#include <string>
#include <bitset>
#include <cfloat>
#include <unordered_set>
#include <iomanip>
using namespace std;
typedef long double ld;
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<ll> vll;
typedef vector<pair<int,int> > vpii;
typedef vector<vector<int> > vvi;
typedef vector<vector<char> > vvc;
typedef vector<vector<string> > vvs;
typedef vector<vector<ll> > vvll;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define irep(it, stl) for(auto it = stl.begin(); it != stl.end(); it++)
#define drep(i,n) for(int i = (n) - 1; i >= 0; --i)
#define fin(ans) cout << (ans) << endl
#define mp(p,q) make_pair(p, q)
#define pb(n) push_back(n)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define Sort(a) sort(a.begin(), a.end())
#define Rort(a) sort(a.rbegin(), a.rend())
#define MATHPI acos(-1)
int dx8[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy8[8] = {0, 1, 0, -1, 1, 1, -1, -1};
int dx4[4] = {1, 0, -1, 0};
int dy4[4] = {0, 1, 0, -1};
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;}
template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val){ fill((T*)array, (T*)(array+N), val); }
struct io{io(){ios::sync_with_stdio(false);cin.tie(0);}};
const int INF = INT_MAX;
const ll LLINF = 1LL<<60;
const ll MOD = 1000000007;
const double EPS = 1e-9;

void modAdd(int &a,int b){
    a += b;
    if(a >= MOD) a-= MOD;
}
int main(void) {
    int H,W;
    vs a;
    int dp[1100][1100] = {0};

    cin >> H >> W;
    a.resize(H);
    rep(i,H) cin >> a[i];

    dp[0][0] = 1;

    rep(i,H){
        rep(j,W){
            if(i+1 < H && a[i+1][j] == '.') add(dp[i+1][j],dp[i][j]);
            if(j+1 < W && a[i][j+1] == '.') add(dp[i][j+1],dp[i][j]);
        }
    }
    fin(dp[H-1][W-1]);//0indexなので

}

Compiler output:
a.cc: In function 'int main()':
a.cc:77:45: error: 'add' was not declared in this scope; did you mean 'fadd'?
   77 |             if(i+1 < H && a[i+1][j] == '.') add(dp[i+1][j],dp[i][j]);
      |                                             ^~~
      |                                             fadd
a.cc:78:45: error: 'add' was not declared in this scope; did you mean 'fadd'?
   78 |             if(j+1 < W && a[i][j+1] == '.') add(dp[i][j+1],dp[i][j]);
      |                                             ^~~
      |                                             fadd
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
  ll i,j,a[1000][1000],dp[1000][1000]={0},h,w;
  cin>>h>>w;
  for(i=0;i<h;i++)
  {
    for(j=0;j<w;j++)
    {
      cin>>ch;
      if(ch=='.')
        a[i][j]=1;
      else
        a[i][j]=0;
    }
  }
  dp[0][0]=1;
  for(i=1;i<h;i++)
  {
    for(j=1;j<w;j++)
    {
      if(a[i][j-1]==1)
        dp[i][j]+=dp[i][j-1];
      if(a[i-1][j]==1)
        dp[i][j]+=dp[i-1][j];
        
    }
  }
  cout<<dp[h-1][w-1];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: 'ch' was not declared in this scope; did you mean 'h'?
   12 |       cin>>ch;
      |            ^~
      |            h
Language: Java

import java.util.*;
import java.math.*;
import java.io.*;
import java.lang.*;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc=new Scanner(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=sc.nextInt(),
            m=sc.nextInt();
        char[][] c=new char[n][m];
        for(int i=0;i<n;i++) {
            String s=sc.next();
            for(int j=0;j<m;j++)
                c[i][j]=(char)s.charAt(j);
        }
        int[][] dp=new int[n][m];
        for(int i=0;i<n;i++) {
            if(c[i][0]=='#')
                break;
            dp[i][0]=1L;
        }
        for(int i=0;i<m;i++) {
            if(c[0][i]=='#')
                break;
            dp[0][i]=1L;
        }
        int mod=1000000007;
        for(int i=1;i<n;i++) {
            for(int j=1;j<m;j++) {
                if(c[i][j]=='#')
                    dp[i][j]=0L;
                else
                    dp[i][j]=(dp[i-1][j]+dp[i][j-1])%mod;
            }
        }
        pw.print(dp[n-1][m-1]);
        pw.close();
    }
}

Compiler output:
Main.java:21: error: incompatible types: possible lossy conversion from long to int
            dp[i][0]=1L;
                     ^
Main.java:26: error: incompatible types: possible lossy conversion from long to int
            dp[0][i]=1L;
                     ^
Main.java:32: error: incompatible types: possible lossy conversion from long to int
                    dp[i][j]=0L;
                             ^
3 errors
Language: Java

import java.util.*;
import java.math.*;
import java.io.*;
import java.lang.*;
public class MyClass {
    public static void main(String[] args) throws Exception {
        Scanner sc=new Scanner(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=sc.nextInt(),
            m=sc.nextInt();
        char[][] c=new char[n][m];
        for(int i=0;i<n;i++) {
            String s=sc.next();
            for(int j=0;j<m;j++)
                c[i][j]=(char)s.charAt(j);
        }
        long[][] dp=new long[n][m];
        for(int i=0;i<n;i++) {
            if(c[i][0]=='#')
                break;
            dp[i][0]=1L;
        }
        for(int i=0;i<m;i++) {
            if(c[0][i]=='#')
                break;
            dp[0][i]=1L;
        }
        long mod=1000000007;
        for(int i=0;i<n;i++) {
            for(int j=0;j<m;j++) {
                if((c[i][j]=='#') || (i==0) || (j==0))
                    continue;
                else
                    dp[i][j]=(dp[i-1][j]+dp[i][j-1])%mod;
            }
        }
        pw.print(dp[n-1][m-1]);
        pw.close();
    }
}

Compiler output:
Main.java:5: error: class MyClass is public, should be declared in a file named MyClass.java
public class MyClass {
       ^
1 error