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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
const ll mod=1e9+7;
char a[1007][1007];
ll dp[1007];
int n,m;
int main()
{
	cin>>n>>m;
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=m;j++) cin>>a[i][j];
	}
	for(int i=1;i<=n;i++) a[i][0]='#';
	for(int j=1;j<=m;j++) a[0][j]='#';
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=m;j++)
		{
			if(a[i][j]=='.'){
			dp[i][j]+=(a[i-1][j]=='.')*dp[i-1][j]+(a[i][j-1]=='.')*dp[i][j-1];
			dp[i][j]%=mod;}
		}
	}
	cout<<dp[n][m];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:30: error: invalid types 'long long int[int]' for array subscript
   22 |                         dp[i][j]+=(a[i-1][j]=='.')*dp[i-1][j]+(a[i][j-1]=='.')*dp[i][j-1];
      |                              ^
a.cc:22:59: error: invalid types 'long long int[int]' for array subscript
   22 |                         dp[i][j]+=(a[i-1][j]=='.')*dp[i-1][j]+(a[i][j-1]=='.')*dp[i][j-1];
      |                                                           ^
a.cc:22:85: error: invalid types 'long long int[int]' for array subscript
   22 |                         dp[i][j]+=(a[i-1][j]=='.')*dp[i-1][j]+(a[i][j-1]=='.')*dp[i][j-1];
      |                                                                                     ^
a.cc:23:30: error: invalid types 'long long int[int]' for array subscript
   23 |                         dp[i][j]%=mod;}
      |                              ^
a.cc:26:20: error: invalid types 'long long int[int]' for array subscript
   26 |         cout<<dp[n][m];
      |                    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
const ll mod=1e9+7;
char a[1007][1007];
ll dp[1007];
int main()
{
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=m;j++) cin>>a[i][j];
	}
	for(int i=1;i<=n;i++) a[i][0]='#';
	for(int j=1;j<=m;j++) a[0][j]='#';
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=m;j++)
		{
			if(a[i][j]=='.'){
			dp[i][j]+=(a[i-1][j]=='.')*dp[i-1][j]+(a[i][j-1]=='.')*dp[i][j-1];
			dp[i][j]%=mod;}
		}
	}
	cout<<dp[n][m];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: 'n' was not declared in this scope
    9 |         for(int i=1;i<=n;i++)
      |                        ^
a.cc:11:32: error: 'm' was not declared in this scope
   11 |                 for(int j=1;j<=m;j++) cin>>a[i][j];
      |                                ^
a.cc:13:24: error: 'n' was not declared in this scope
   13 |         for(int i=1;i<=n;i++) a[i][0]='#';
      |                        ^
a.cc:14:24: error: 'm' was not declared in this scope
   14 |         for(int j=1;j<=m;j++) a[0][j]='#';
      |                        ^
a.cc:15:24: error: 'n' was not declared in this scope
   15 |         for(int i=1;i<=n;i++)
      |                        ^
a.cc:17:32: error: 'm' was not declared in this scope
   17 |                 for(int j=1;j<=m;j++)
      |                                ^
a.cc:20:30: error: invalid types 'long long int[int]' for array subscript
   20 |                         dp[i][j]+=(a[i-1][j]=='.')*dp[i-1][j]+(a[i][j-1]=='.')*dp[i][j-1];
      |                              ^
a.cc:20:59: error: invalid types 'long long int[int]' for array subscript
   20 |                         dp[i][j]+=(a[i-1][j]=='.')*dp[i-1][j]+(a[i][j-1]=='.')*dp[i][j-1];
      |                                                           ^
a.cc:20:85: error: invalid types 'long long int[int]' for array subscript
   20 |                         dp[i][j]+=(a[i-1][j]=='.')*dp[i-1][j]+(a[i][j-1]=='.')*dp[i][j-1];
      |                                                                                     ^
a.cc:21:30: error: invalid types 'long long int[int]' for array subscript
   21 |                         dp[i][j]%=mod;}
      |                              ^
a.cc:24:18: error: 'n' was not declared in this scope; did you mean 'yn'?
   24 |         cout<<dp[n][m];
      |                  ^
      |                  yn
a.cc:24:21: error: 'm' was not declared in this scope; did you mean 'tm'?
   24 |         cout<<dp[n][m];
      |                     ^
      |                     tm
Language: C++

#include<bits/stdc++.h>
using namespace std;
string s[1002];
int dp[1002][1002];
const int MOD = 1e9 + 7;
int main(){
  int h, w;
  string s;
  cin>>h>>w;
  for(int i=0;i<h;i++){
    cin>>s[i];
}
  int dp[h][w];
  dp[0][0]=0;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(s[i][j]=='#'){
        dp[i][j]=0;
        continue;
      }
      if(i>0)
        dp[i][j]+=dp[i-1][j];
      if(j>0)
        dp[i][j]+=dp[i][j-1];
    }
  }
  cout<<dp[h-1][w-1]%MOD;
  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   17 |       if(s[i][j]=='#'){
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main(){
  int h, w;
  string s;
  cin>>h>>w;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
    cin>>s[i][j];
    }
}
  int dp[h][w];
  dp[0][0]=0;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(s[i][j]=='#'){
        dp[i][j]=0;
        continue;
      }
      if(i>0)
        dp[i][j]+=dp[i-1][j];
      if(j>0)
        dp[i][j]+=dp[i][j-1];
    }
  }
  cout<<dp[h-1][w-1]%MOD;
  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   10 |     cin>>s[i][j];
      |              ^
a.cc:17:14: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   17 |       if(s[i][j]=='#'){
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main(){
  int h, w;
  string s;
  cin>>h>>w;
  for(int i=0;i<h;i++){
    cin>>s[i];
}
  int dp[h][w];
  dp[0][0]=0;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(s[i][j] == '#'){
        dp[i][j]=0;
        continue;
      }
      if(i>0)
        dp[i][j]+=dp[i-1][j];
      if(j>0)
        dp[i][j]+=dp[i][j-1];
    }
  }
  cout<<dp[h-1][w-1]%MOD;
  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   15 |       if(s[i][j] == '#'){
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main(){
  int h, w;
  string s;
  cin>>h>>w;
  for(int i=0;i<h;i++){
    cin>>s[i];
}
  int dp[h][w];
  dp[0][0]=0;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(s[i][j]=='#'){
        dp[i][j]=0;
        continue;
      }
      if(i>0)
        dp[i][j]+=dp[i-1][j];
      if(j>0)
        dp[i][j]+=dp[i][j-1];
    }
  }
  cout<<dp[h-1][w-1]%MOD;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   15 |       if(s[i][j]=='#'){
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = (ll)(1e9 + 7);
vector<string> grid;
ll dp[1100][1100];
int main() {
    int h, w;
    cin >> h >> w;
    for (int i = 0; i < h; i++) {
        string s;cin >> s;
        grid.push_back(s);
    }
    dp[0][0] = 1ll;
    for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) {
        // dp[i][j] %= MOD;        //////// この処理をループの最後に持ってくるとなぜかacしない
           /////////　pythonだとacするが後に持ってくるのと先に行うのでは処理速度が違う
           /////////　先に持ってくるのが5倍程度早い(PyPy3の場合)
        if (i + 1 < h && grid[i+1][j] == '.') {dp[i+1][j] += dp[i][j];}
        if (j + 1 < w && grid[i][j+1] == '.') {dp[i][j+1] += dp[i][j];}
        dp[i][j] %= MOD;     
    }
    cout << dp[h-1][w-1] << endl;
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:24:14: error: expected '}' at end of input
   24 |     return 0;
      |              ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
string s[1002];

const int mod=1e9+7;
int dp[1002][1002];
int main()
{
  int h,w;
  cin>>h>>w;
  for(int i=0;i<h;i++)
   cin>>s[i];
  dp[0][0]=1;
  for(int i=0;i<h;i++)
  {
     for(int j=0;j<w;j++)
     {
       if(s[i][j]=='#')
       {
          dp[i][j]=0;
         continue;
       }
      if(i>0) dp[i][j]+=dp[i-1][j];
       dp[i][j]%=MOD;
      if(j>0) dp[i][j]+=dp[i][j-1];
       dp[i][j]%=MOD;
       
     }
  }
  cout<<dp[h-1][w-1];
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:18: error: 'MOD' was not declared in this scope
   24 |        dp[i][j]%=MOD;
      |                  ^~~
Language: C++

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

#define ll long long
#define forr(i,n) for(ll i=0;i<n;i++)
#define f(i,a,b) for(int i=a;i<b;i++)
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define vi vector<ll>
#define endl '\n'
#define ce(ele) cout<<ele<<' '
#define cs(ele) cout<<ele<<'\n'
#define CASE(t) ll t; cin>>t; while(t--)
#define sor(v) sort(v.begin(),v.end())
#define rev(v) reverse(v.begin(),v.end())

ll power(ll a,ll b){ll r=1;while(b--)r*=a;return r;}
const ll INF=1e17L+5;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);

    int n,m;cin>>n>>m;
    vector<vector<int>> v(n,vector<int>(m,0)),dp(n,vector<int>(m,0));
    f(i,0,n)f(j,0,m){
        char c;cin>>c;
        if(c=='.')v[i][j]=1;
    }
    f(i,0,m){
        if(v[0][i]==0)break;
        dp[0][i]=1;
    }
    f(i,0,n){
        if(v[i][0]==0)break;
        dp[i][0]=1;
    }
    f(i,1,n){
        f(j,1,m){
            if(v[i-1][j])dp[i][j]+=dp[i-1][j];
            if(v[i][j-1])dp[i][j]+=dp[i][j-1];
        }
    }
    cs(dp[n-1][m-1]);
    /*f(i,0,n){
        f(j,0,m)ce(dp[i][j]);
        cout<<endl;
    }/*

  }


Compiler output:
a.cc:48:5: error: unterminated comment
   48 |     /*f(i,0,n){
      |     ^
a.cc: In function 'int main()':
a.cc:47:22: error: expected '}' at end of input
   47 |     cs(dp[n-1][m-1]);
      |                      ^
a.cc:23:1: note: to match this '{'
   23 | {
      | ^
Language: C++

const long long c{1e9+7};
#include<bits/stdc++.h>
using namespace std;
int main(){
	int row,col;
	cin>>row>>col;
	vector<vector<char>> g(row,vector<char>(col));
	for(int i{};i<row;i++){
		string a;
		cin>>a;
		for(int j{};j<col;j++){
			g[i][j]=a[j];
		}
	}	
	vector<vector<int>> dp(row+1,vector<int>(col+1));
	dp[0][1]=1;
	for(int i{};i<row;i++){
		for(int j{};j<col;j++){
			if(g[i][j]=='#'){
				dp[i+1][j+1]=0;
			}
			else dp[i+1][j+1]=dp[i+1][j]+dp[i][j+1];
			
			if(dp[i+1][j+1]>c){
				dp[i+1][j+1]-=c;
			}
		}
	}
	cout<<dp[row][col];
}

Compiler output:
a.cc:1:22: error: narrowing conversion of '1.000000007e+9' from 'double' to 'long long int' [-Wnarrowing]
    1 | const long long c{1e9+7};
      |                   ~~~^~
Language: C++

const long long c{1e10+7};
#include<bits/stdc++.h>
using namespace std;
int main(){
	int row,col;
	cin>>row>>col;
	vector<vector<char>> g(row,vector<char>(col));
	for(int i{};i<row;i++){
		string a;
		cin>>a;
		for(int j{};j<col;j++){
			g[i][j]=a[j];
		}
	}	
//	for(auto &x:g){
//		for(auto &y:x){
//			cout<<y<<"\t";
//		}
//		cout<<endl<<endl;
//	}
//	cout<<endl;
	vector<vector<int>> dp(row+1,vector<int>(col+1));
	dp[0][1]=1;
	for(int i{};i<row;i++){
		for(int j{};j<col;j++){
			if(g[i][j]=='#'){
				dp[i+1][j+1]=0;
			}
			else dp[i+1][j+1]=dp[i+1][j]+dp[i][j+1];
		}
	}
//	cout<<endl;
//	for(auto &y: dp){
//		for(auto &x:y){
//			cout<<x<<"\t";
//		}
//		cout<<endl;
//	}
	cout<<dp[row][col];
}

Compiler output:
a.cc:1:23: error: narrowing conversion of '1.0000000007e+10' from 'double' to 'long long int' [-Wnarrowing]
    1 | const long long c{1e10+7};
      |                   ~~~~^~
Language: C++

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

const int mod = 1e9+7;
int H,W,dp[1001][1001];
string graph[1001],
// int in,jn;

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

bool valid(int x, int y){
	bool inside = (x>=0 && x<H &&y>=0 &&y<W);
	bool empty = (graph[x][y]=='.');
	return inside && empty;
}

int main(){
	cin>>H>>W;
	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			cin>>graph[i];
			dp[i][j] = 0;
		}
	}

    dp[0][0] = 1;
    
	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			if(graph[i][j]=='.'){
			 //   cout<<'processing '<<i<<" "<<j<<endl;
				for(int k=0;k<4;k++){
				    // cout<<j<<" "<<k<<endl;
					int in = i+int(x[k]);
					int jn = j+int(y[k]);
					if(valid(in,jn)){
						dp[in][jn] += dp[i][j]%mod;
						dp[in][jn] = dp[in][jn]%mod;
					}
				}
			}
		}
	}

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

Compiler output:
a.cc:9:1: error: expected unqualified-id before 'int'
    9 | int x[4] = {1,0,-1,0}, y[4] = {0,1,0,-1};
      | ^~~
a.cc:9:22: error: expected unqualified-id before ',' token
    9 | int x[4] = {1,0,-1,0}, y[4] = {0,1,0,-1};
      |                      ^
a.cc:9:29: error: expected constructor, destructor, or type conversion before '=' token
    9 | int x[4] = {1,0,-1,0}, y[4] = {0,1,0,-1};
      |                             ^
a.cc: In function 'int main()':
a.cc:34:56: error: 'x' was not declared in this scope
   34 |                                         int in = i+int(x[k]);
      |                                                        ^
a.cc:35:56: error: 'y' was not declared in this scope
   35 |                                         int jn = j+int(y[k]);
      |                                                        ^
Language: C++

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

const int mod = 1e9+7;
int H,W,dp[1001][1001];
string graph[1001];
// int in,jn;

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

bool valid(int x, int y){
	bool inside = (x>=0 && x<H &&y>=0 &&y<W);
	bool empty = (graph[x][y]=='.');
	return inside && empty;
}

int main(){
  ios:sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
	cin>>H>>W;
	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			cin>>graph[i];
			dp[i][j] = 0;
		}
	}

    dp[0][0] = 1;
    
	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			if(graph[i][j]=='.'){
			 //   cout<<'processing '<<i<<" "<<j<<endl;
				for(int k=0;k<4;k++){
				    // cout<<j<<" "<<k<<endl;
					int in = i+int(x[k]);
					int jn = j+int(y[k]);
					if(valid(in,jn)){
						dp[in][jn] += dp[i][j]%mod;
						dp[in][jn] = dp[in][jn]%mod;
					}
				}
			}
		}
	}

	cout<<dp[H][W]<<endl;
  return 0;
}

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

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

const int mod = 1e9+7;
int H,W,graph[1001][1001];

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

def valid(int x, int y){
	bool inside = x>=0 && x<H &&y>=0 &&y<W;
	bool empty = (graph[x][y]=='.');
	return inside && empty;
}

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

	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			if(graph[i][j]=='.'){
				for(int k=0;k<4;k++){
					in = i+x[k];
					jn = j+y[k];
					if(valid(in,jn)){
						dp[in][jn] += dp[i][j]%mod;
						dp[in][jn] = dp[in][jn]%mod;
					}
				}
			}
		}
	}

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

Compiler output:
a.cc:9:1: error: 'def' does not name a type
    9 | def valid(int x, int y){
      | ^~~
a.cc: In function 'int main()':
a.cc:29:41: error: 'in' was not declared in this scope; did you mean 'i'?
   29 |                                         in = i+x[k];
      |                                         ^~
      |                                         i
a.cc:30:44: error: assignment of function 'double jn(int, double)'
   30 |                                         jn = j+y[k];
      |                                         ~~~^~~~~~~~
a.cc:31:44: error: 'valid' was not declared in this scope
   31 |                                         if(valid(in,jn)){
      |                                            ^~~~~
Language: C++

#include<iostream>
#include<bits./stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll h,w;
	cin>>h>>w;
	char matrix[h][w];
	for(ll i=0;i<h;i++){
		for(ll j=0;j<w;j++){
			cin>>matrix[i][j];
		}
	}
	ll dp[h+1][w+1];
	for(ll i=0;i<=h;i++){
		for(ll j=0;j<=w;j++){
			dp[i][j]=0;
		}
	}
	for(ll i=1;i<=h;i++){
		for(ll j=1;j<=w;j++){
			if(i==1 && j==1){
				dp[i][j]=1;
			}
			else if(matrix[i-1][j-1]=='.'){
				dp[i][j]=dp[i-1][j]%1000000007+dp[i][j-1]%1000000007;
			}
		}
	}
	cout<<dp[h][w]%1000000007<<endl;
	
}

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

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

const int mod=1e9+7;

int main(){
    int h,w;
    cin>>h>>w;
    vector<vector<int>> dp(1001,vector<int>(1001,0));
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            char x;
            cin>>x;
            if(x=='.'){
                if(i==0 && j==0) dp[i][j]=1;
                else if(i==0) dp[i][j]=dp[0][j-1];
                else if(j==0) dp[i][j]=dp[i-1][j];
                else (dp[i][j]= dp[i][j-1]+dp[i-1][j])=%mod;
            }
            else if(x=='*'){
                dp[i][j]=0;
            }
        }
    }
    cout<<dp[h-1][w-1];

}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:56: error: expected primary-expression before '%' token
   19 |                 else (dp[i][j]= dp[i][j-1]+dp[i-1][j])=%mod;
      |                                                        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007;
void boost(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
}

int main(){
    boost();
    ll n,m;
    cin >> n >> m;
    ll arr[n][m],dp[n][m],i,j;
    for(i=0;i<n;i++)
    for(j=0;j<m;j++){
        dp[i][j]=0;
        char a;
        cin >> a;
        if(a=='.')
        arr[i][j]=0;
        else if(a=='#')
        arr[i][j]=1;
        
    }
    
    if(arr[0][0]==0)
    dp[0][0]=1;
    
    for(i=1;i<n;i++)
    if(arr[i][0]==0)
    dp[i][0] = dp[i-1][0];
    
    for(i=1;i<m;i++)
    if(arr[0][i]==0)
    dp[0][i] = dp[0][i-1];
    
    for(i=1;i<n;i++){
        for(j=1;j<m;j++){
            if(arr[i][j]==0){
            dp[i][j] = dp[i-1][j]+dp[i][j-1];
            dp[i][j] = dp[i][j]%mod;
            }
        }
    }
    cout << dp[n-1][m-1]%mod << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:30: error: expected primary-expression before '<<' token
   46 |     cout << dp[n-1][m-1]%mod << endl;
      |                              ^~
Language: Java

import java.util.*;
import java.io.*;

static class Point{
		int x;
		int y;
		public Point(int x,int y) {
			this.x=x;
			this.y=y;
		}
	}
public class Main{
	
	static int w,h;
	static String [][]grid;
	static int counter=0;
	static int dp[][];
	
	public static int tr(Point a) {
		
		try {
			if((a.x==(w-1))&&(a.y==(h-1))) 
				return counter++;
		}catch (Exception e) {
			System.out.println(e);
		}
		
		
		
			
		if(!valid(a))
			return -(int)1e9;
		
//		System.out.println("point : x : "+a.x+" y :"+a.y);
		Point down=new Point(a.x,a.y+1);
		Point right=new Point(a.x+1,a.y);
		
		try {
			if(dp[a.x][a.y]!=-1) {
				return dp[a.x][a.y];
			}
		}catch (Exception e) {
//			System.out.println("wrong!");
		}
		tr(down);
		tr(right);
//		dp[a.x][a.y]=tr(down);
//		dp[a.x][a.y]=tr(left);
		return (int) (counter%(1e9+7));
	}

	public static boolean valid(Point a) {
		
		try {
			if(grid[a.y][a.x]!=null) {
//				
				if(grid[a.y][a.x].equals("#")) 
					return false;
				
				if(grid[a.y][a.x].equals(".")) 
					return true;

					
			}
		}catch (Exception e) {

			return false;
			
		}
		
		return false;
	}
	public static void print(String [][]grid) {
		for (int i = 0; i < grid.length; i++) {
			for (int j = 0; j < grid[i].length; j++) {
				System.out.print(grid[i][j]);
			}
			System.out.println();
		}
	}
	public static void main (String[]args) throws IOException {
		 
		
		
		Scanner sc=new Scanner (System.in);
		PrintWriter pw=new PrintWriter(System.out);
		
		
		h=sc.nextInt();
		w=sc.nextInt();
		dp=new int [h][w];
		
		grid=new String[h][w];
		for(int i=0;i<h;i++) {
			for(int j=0;j<w;j++) {
				grid[i][j]=sc.next();
				
			}
		}
//		for(int i=0;i<h;i++) {
//			for(int j=0;j<w;j++) {
//				dp[i][j]=-1;
//				
//			}
//		}
		
//		print(grid);
//		for (int i = 0; i < h; i++) {
//			for (int j = 0; j < w; j++) {
//				pw.print(" i: "+i+" j:"+j+"-"+ tr(new Point(i,j)));
//				counter=0;
//			}
//		}
		pw.print( tr(new Point(0,0)));
		counter=0;
//		pw.print(valid(new Point(0,0)));
		pw.close();
		
	}
	static class Scanner {
		BufferedReader br;
		StringTokenizer st;
		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
		public int[] nextIntArr(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = Integer.parseInt(next());
			}
			return arr;
		}
	}
	
}

Compiler output:
Main.java:4: error: modifier static not allowed here
static class Point{
       ^
1 error
Language: Java

import java.util.*;
import java.io.*;

public class Grid1 {
	
	static int w,h;
	static String [][]grid;
	static int counter=0;
	static int dp[][];
	
	public static int tr(Point a) {
		
		try {
			if((a.x==(w-1))&&(a.y==(h-1))) 
				return counter++;
		}catch (Exception e) {
			System.out.println(e);
		}
		
		
		
			
		if(!valid(a))
			return -(int)1e9;
		
//		System.out.println("point : x : "+a.x+" y :"+a.y);
		Point down=new Point(a.x,a.y+1);
		Point right=new Point(a.x+1,a.y);
		
		try {
			if(dp[a.x][a.y]!=-1) {
				return dp[a.x][a.y];
			}
		}catch (Exception e) {
//			System.out.println("wrong!");
		}
		tr(down);
		tr(right);
//		dp[a.x][a.y]=tr(down);
//		dp[a.x][a.y]=tr(left);
		return (int) (counter%(1e9+7));
	}

	public static boolean valid(Point a) {
		
		try {
			if(grid[a.y][a.x]!=null) {
//				
				if(grid[a.y][a.x].equals("#")) 
					return false;
				
				if(grid[a.y][a.x].equals(".")) 
					return true;

					
			}
		}catch (Exception e) {

			return false;
			
		}
		
		return false;
	}
	public static void print(String [][]grid) {
		for (int i = 0; i < grid.length; i++) {
			for (int j = 0; j < grid[i].length; j++) {
				System.out.print(grid[i][j]);
			}
			System.out.println();
		}
	}
	public static void main (String[]args) throws IOException {
		 
		
		
		Scanner sc=new Scanner (System.in);
		PrintWriter pw=new PrintWriter(System.out);
		
		
		h=sc.nextInt();
		w=sc.nextInt();
		dp=new int [h][w];
		
		grid=new String[h][w];
		for(int i=0;i<h;i++) {
			for(int j=0;j<w;j++) {
				grid[i][j]=sc.next();
				
			}
		}
//		for(int i=0;i<h;i++) {
//			for(int j=0;j<w;j++) {
//				dp[i][j]=-1;
//				
//			}
//		}
		
//		print(grid);
//		for (int i = 0; i < h; i++) {
//			for (int j = 0; j < w; j++) {
//				pw.print(" i: "+i+" j:"+j+"-"+ tr(new Point(i,j)));
//				counter=0;
//			}
//		}
		pw.print( tr(new Point(0,0)));
		counter=0;
//		pw.print(valid(new Point(0,0)));
		pw.close();
		
	}
	static class Scanner {
		BufferedReader br;
		StringTokenizer st;
		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
		public int[] nextIntArr(int n) throws IOException {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = Integer.parseInt(next());
			}
			return arr;
		}
	}
	static class Point{
		int x;
		int y;
		public Point(int x,int y) {
			this.x=x;
			this.y=y;
		}
	}
}

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

import java.util.*;
public class dp7 {
	public static void Main(String[] args) {
		Scanner scn=new Scanner(System.in);
		int n=scn.nextInt();
		int w=scn.nextInt();
		long[][]dp=new long[n+1][w+1];
		char[][] ip=new char[n][w];
		
		for(int i=0;i<n;i++) {
			String a=scn.next();
			char[] arr=a.toCharArray();
			for(int j=0;j<w;j++) {
				ip[i][j]=arr[j];
				
			}
		}
		for(int i=0;i<=n;i++) {
			for(int j=0;j<=w;j++) {
				if(i==0||j==0) {
					dp[i][j]=0;
					continue;
				}
				if(i==1&&j==1) {
					dp[i][j]=1;
					continue;
				}
				if(ip[i-1][j-1]=='#') {
					dp[i][j]=0;
					continue;
					
				}
				dp[i][j]=dp[i-1][j]+dp[i][j-1];
				
					
			}
			
		}
		long m = 1000000007;
		System.out.println((dp[n][w])%m);
		
	}
	
	

}


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

#include <iostream>
#include<string>
#include<algorithm>
#include<map>
#include<unordered_map>
#include<vector>
#include<set>
#include<list>

using namespace std;
typedef long long ll;
int modulo = 1e9 + 7;
int main() {
    int rows,cols;
    cin>>rows>>cols;
    ll dp[rows+1][cols+1], arr[rows+1][cols+1];
    memset(dp,0,sizeof dp);
    char c;
    for(int i = 0; i<rows; i++){
        for(int j = 0; j<cols; j++){

            cin>>c;
            if(c == '.'){
                arr[i][j] = 0;
            }
            else{
                arr[i][j] = 1;
            }
        }
    }
    if(arr[0][0]!=0){
        cout<<"0"<<"\n";
        return 0;
    }
    dp[0][0] = 1;
    for(int i = 1; i<rows; i++){
        if(arr[i][0] == 0){
            dp[i][0] = (dp[i-1][0])%modulo;
        }
        else{
            dp[i][0] = 0;
        }
    }
    for(int i = 1; i<cols; i++){
        if(arr[0][i] == 0){
            dp[0][i] = dp[0][i-1]%modulo;
        }
        else{
            dp[0][i] = 0;
        }
    }
    for(int i = 1; i<rows; i++){
        for(int j = 1; j<cols; j++){
            if(arr[i][j] == 0){
                dp[i][j] = (dp[i-1][j] + dp[i][j-1])%modulo;
            }
            else{
                dp[i][j] = 0;
            }
        }
    }
    dp[rows-1][cols-1] = dp[rows-1][cols-1]%modulo;
    cout<<(dp[rows-1][cols-1])<<"\n";
}


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


#include<bits/stdc++.h>

using namespace std;

/*helpfull*/
using vl  = vector<long long>;
using vpl = vector<pair<long long, long long>>;
using vs = vector<string>;
using pl  = pair<long long, long long>;
using ll  = long long int;
using vb  = vector<bool>;


struct hash_pair {
    template <class T1, class T2>
    size_t operator()(const pair<T1, T2>& p) const
    {
        auto hash1 = hash<T1> {}(p.first);
        auto hash2 = hash<T2> {}(p.second);
        return hash1 ^ hash2;
    }
};
// #ifndef ONLINE_JUDGE
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);
// #endif

// shortcut macros
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define mp              make_pair
#define fi              first
#define se              second
// #define mt              make_tuple
#define pb              push_back
#define all(x)          (x).begin(), (x).end()
#define ini(a, v)       memset(a, v, sizeof(a))
#define rep(i, a, n)    for(ll i=a ; i<n ; ++i)
#define For(i, n)       rep(i, 0, n)
#define sz(x)           (int((x).size()))
#define ump(x,y)        unordered_map<x,y>
#define umpr(x,y,z)     unordered_map<x,y,z>
void printcase(ll &x) {
    cout << "Case #" << x << ": ";
}
void read(vector<ll>&v, ll &n) {
    For(i, n)
    cin >> v[i];
}
void read(ll &x) {
    cin >> x;
}
void read(string &s) {
    cin >> s;
}
void read(int &x) {
    cin >> x;
}
void read(ll a[], ll &n) {
    For(i, n)
    cin >> a[i];
}
void print() {
    cout << endl;
}
void write(vector<ll>&v, ll &n) {
    For(i, n)
    cout << v[i] << " ";
    cout << endl;
}
void write(vector<ll>&v) {
    ll n = v.size();
    For(i, n)
    cout << v[i] << " ";
    cout << endl;
}
void write(ll x) {
    cout << x << endl;
}
void write(string &s) {
    cout << s << endl;
}
void write(int &x) {
    cout << x << endl;
}
void write(ll a[], ll &n) {
    For(i, n)
    cout << a[i] << " ";
    cout << endl;
}
const ll mod = 1e9 + 7;


count_path(ll x, ll y, ll &n, ll &m, vector<string> &v, vector<vector<ll>> &memo) {
    if (memo[x][y] != -1)
        return memo[x][y] % mod;
    if (x == n - 1 && y == m - 1)
        memo[x][y] = 1;
    else if (x >= n || y >= m)
        memo[x][y] = 0;
    else if (v[x][y] == '#')
        memo[x][y] = 0;
    else
        memo[x][y] = (count_path(x + 1, y, n, m, v, memo) % mod + count_path(x, y + 1, n, m, v, memo) % mod) % mod;

    return memo[x][y] % mod;
}
int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    IOS;
    ll n , m;
    cin >> n >> m;
    vector<string> v(n);
    For(i, n)
    cin >> v[i];

    vector<vector<ll>> memo(n + 1, vector<ll>(m + 1, -1));
    write(count_path(0, 0, n, m, v, memo));
    return 0;
}




Compiler output:
a.cc:94:1: error: ISO C++ forbids declaration of 'count_path' with no type [-fpermissive]
   94 | count_path(ll x, ll y, ll &n, ll &m, vector<string> &v, vector<vector<ll>> &memo) {
      | ^~~~~~~~~~
Language: C++

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

const int MAXN = 1010;
const int MOD = 1e9 + 7;

char entrada[MAXN][MAXN];
int dp[MAXN][MAXN],vis[MAXN][MAXN];
int N,M;

int solve(int x,int y){

	if(x >= N || y >= M) return 0;
	if(entrada[x][y] == '#') return 0;

	if(vis[x][y]) return dp[x][y];
	if(x == N - 1 && y == M - 1) return dp[x][y] = 1;

	vis[x][y] = 1;
	return dp[x][y] = (solve(x+1,y) + solve(x,y+1)) % MOD;

}

int main(){
	cin>>N>>M;
	for(int i = 0;i<N;i++){
		cin>>entrada[i];
	}

	cout<<solve(0,0)<<endl;

	return 0;

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

class practive {
	public static int griditer(int r, int c, int [][]a) {

		int [][]mat = new int [r][c];
		mat[0][0] = 0;
		for(int i =1 ;i<r;i++) {
			if(a[i][0] == '.') {
				mat[i][0] = 1;
			}
			else if(a[i][0] == '#') {
				break;
			}
		}
		for(int j =1 ;j<c;j++) {
			if(a[0][j] == '.') {
				mat[0][j] = 1;
		}
			else if(a[0][j] == '#'){
				break;
			}
		}
		for(int i =1;i<r;i++) {
			for(int j =1;j<c;j++) {
				if(a[i][j] == '.') {
					mat[i][j] = mat[i-1][j] + mat[i][j-1];
				}
				else {
					mat[i][j] = 0;
				}
				
			}
			}
		return mat[r-1][c-1];
		
	}

Compiler output:
Main.java:35: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

public class practive {
	public static int griditer(int r, int c, int [][]a) {

		int [][]mat = new int [r][c];
		mat[0][0] = 0;
		for(int i =1 ;i<r;i++) {
			if(a[i][0] == '.') {
				mat[i][0] = 1;
			}
			else if(a[i][0] == '#') {
				break;
			}
		}
		for(int j =1 ;j<c;j++) {
			if(a[0][j] == '.') {
				mat[0][j] = 1;
		}
			else if(a[0][j] == '#'){
				break;
			}
		}
		for(int i =1;i<r;i++) {
			for(int j =1;j<c;j++) {
				if(a[i][j] == '.') {
					mat[i][j] = mat[i-1][j] + mat[i][j-1];
				}
				else {
					mat[i][j] = 0;
				}
				
			}
			}
		return mat[r-1][c-1];
		
	}}

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

public class practive {
	public static int griditer(int r, int c, int [][]a) {

		int [][]mat = new int [r][c];
		mat[0][0] = 0;
		for(int i =1 ;i<r;i++) {
			if(a[i][0] == '.') {
				mat[i][0] = 1;
			}
			else if(a[i][0] == '#') {
				break;
			}
		}
		for(int j =1 ;j<c;j++) {
			if(a[0][j] == '.') {
				mat[0][j] = 1;
		}
			else if(a[0][j] == '#'){
				break;
			}
		}
		for(int i =1;i<r;i++) {
			for(int j =1;j<c;j++) {
				if(a[i][j] == '.') {
					mat[i][j] = mat[i-1][j] + mat[i][j-1];
				}
				else {
					mat[i][j] = 0;
				}
				
			}
			}
		return mat[r-1][c-1];
		
	}

Compiler output:
Main.java:35: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

public static int griditer(int r, int c, int [][]a) {

		int [][]mat = new int [r][c];
		mat[0][0] = 0;
		for(int i =1 ;i<r;i++) {
			if(a[i][0] == '.') {
				mat[i][0] = 1;
			}
			else if(a[i][0] == '#') {
				break;
			}
		}
		for(int j =1 ;j<c;j++) {
			if(a[0][j] == '.') {
				mat[0][j] = 1;
		}
			else if(a[0][j] == '#'){
				break;
			}
		}
		for(int i =1;i<r;i++) {
			for(int j =1;j<c;j++) {
				if(a[i][j] == '.') {
					mat[i][j] = mat[i-1][j] + mat[i][j-1];
				}
				else {
					mat[i][j] = 0;
				}
				
			}
			}
		return mat[r-1][c-1];
		
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static int griditer(int r, int c, int [][]a) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

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

public class Grid {


    private static final BufferedReader scan= new BufferedReader(new InputStreamReader(System.in));
    static char [][] arr;
    static StringBuilder sb;
    static long[][] dp;

    public static void main(String [] args) throws IOException {
        String [] nm= scan.readLine().split(" ");

        int n= Integer.parseInt(nm[0]);
        int m= Integer.parseInt(nm[1]);

        arr= new char[n][m];

        for(int i= 0; i< n; i++){
            String  rItem= scan.readLine();
            for(int j= 0; j< m; j++){
                arr[i][j]= rItem.charAt(j);
            }
        }

        dp= new long[n][m];
        for(long[] longs: dp) Arrays.fill(longs, -1);
        System.out.println(countPath(0, 0));
    }

    private static long countPath(int rIdx, int cIdx) {
        if(rIdx == arr.length || cIdx == arr[0].length || arr[rIdx][cIdx] == '#')
            return 0;

        if(rIdx == arr.length - 1 && cIdx == arr[0].length - 1)
            return 1;

        if(dp[rIdx][cIdx] != -1)
            return dp[rIdx][cIdx];

        long right= countPath(rIdx, cIdx + 1);
        long down= countPath(rIdx + 1, cIdx);

        return dp[rIdx][cIdx]= (right + down) % (long)(Math.pow(10, 9) + 7) ;
    }
}


Compiler output:
Main.java:6: error: class Grid is public, should be declared in a file named Grid.java
public class Grid {
       ^
1 error
Language: Java

package ss;

import java.util.*;
public class DP{
	static char[][]hw;
	static double[][]memo;
	static int h,w;
	
	public static double dp(int i,int j) {
		
		if(i==h-1&&j==w-1)
			return 1;
		if(i==h||j==w)
			return 0;
		else if(memo[i][j]!=-1)
			 return memo[i][j];
		else if(i+1<h&&j+1<w&&hw[i+1][j]=='.'&&hw[i][j+1]=='.')
			return memo[i][j] =dp(i+1,j)+dp(i,j+1);
		else if(i+1<h&&hw[i+1][j]=='.')
			return memo[i][j] = dp(i+1,j);
		else if(j+1<w&&hw[i][j+1]=='.')
		return memo[i][j] =dp(i,j+1);
		return  memo[i][j] =0;
		
		
		
	}
	public static void main (String[]args) {
		Scanner sc=new Scanner(System.in);
		h=sc.nextInt();
		w=sc.nextInt();
		hw=new char [h][w];
		for(int i=0;i<hw.length;i++) {
			
			
				hw[i]=sc.next().toCharArray();
			
			}
			memo=new double[h][w];
			for(double[]x:memo)
				Arrays.fill(x,-1);
			
		
		
		
		System.out.println((long)(dp(0,0)%1000000007));
		
		
		
		
	}
}

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

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

// void dfs(int x, int y, vector<vector<int>>& grid, vector<vector<int>>& ans,int& n, int& m)
// {
// 	ans[x][y]++;
// 	ans[x][y]%=M;

// 	if(x+1 < n && grid[x+1][y]==1)
// 		dfs(x+1,y,grid,ans,n,m);
// 	if(y+1 < m && grid[x][y+1]==1)
// 		dfs(x,y+1,grid,ans,n,m);
// }

int main()
{

	// #ifndef ONLINE_JUDGE
	// 		freopen("input", "r", stdin);
	// 		freopen("output","w",stdout);
	// #endif

	int n,m;	cin>>n>>m;
	vector<vector<int>> v(n,vector<int>(m,0)), ans(n,vector<int>(m,0));
	int v[n][m], ans[n][m];

	memset(v,0,sizeof(v));
	memset(ans,0,sizeof(ans));

	for(int i=0;i<n;++i)
		for(int j=0;j<m;++j)
		{
			char c;	cin>>c;
			if(c=='.')	v[i][j]=1;
		}

	ans[0][0]=1;
	

	for(int i=0;i<n;++i)
		for(int j=0;j<m;++j)
			if(v[i][j]==1 && (j!=0 || i!=0))
				ans[i][j] = ((i-1>=0?ans[i-1][j]:0) + (j-1>=0?ans[i][j-1]:0))%M;

	cout<<ans[n-1][m-1]<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: conflicting declaration 'int v [n][m]'
   26 |         int v[n][m], ans[n][m];
      |             ^
a.cc:25:29: note: previous declaration as 'std::vector<std::vector<int> > v'
   25 |         vector<vector<int>> v(n,vector<int>(m,0)), ans(n,vector<int>(m,0));
      |                             ^
a.cc:26:22: error: conflicting declaration 'int ans [n][m]'
   26 |         int v[n][m], ans[n][m];
      |                      ^~~
a.cc:25:52: note: previous declaration as 'std::vector<std::vector<int> > ans'
   25 |         vector<vector<int>> v(n,vector<int>(m,0)), ans(n,vector<int>(m,0));
      |                                                    ^~~
a.cc:28:16: error: cannot convert 'std::vector<std::vector<int> >' to 'void*'
   28 |         memset(v,0,sizeof(v));
      |                ^
      |                |
      |                std::vector<std::vector<int> >
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:61:28: note:   initializing argument 1 of 'void* memset(void*, int, size_t)'
   61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
      |                      ~~~~~~^~~
a.cc:29:16: error: cannot convert 'std::vector<std::vector<int> >' to 'void*'
   29 |         memset(ans,0,sizeof(ans));
      |                ^~~
      |                |
      |                std::vector<std::vector<int> >
/usr/include/string.h:61:28: note:   initializing argument 1 of 'void* memset(void*, int, size_t)'
   61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
      |                      ~~~~~~^~~
Language: Java

import java.util.*;
import java.io.*;

public class fib {
	static char [] [] mygrid;
	static int h;
	static int w;
	static long [][]mydpArr ;
	public static long dp(int x, int y) {
		if (x==h-1 &&y==w-1)
			return 1;
		if(x>=h || y>=w)
			return 0;
		if ((x+1>=h||mygrid [x+1][y] =='#')&&(y+1>=w||mygrid [x][y+1] =='#'))
				return mydpArr[x][y] =0;
		if (mydpArr[x][y] != -1)
			return mydpArr[x][y];
		if((x+1<h&&mygrid [x+1][y]  !='#')&&(y+1<w&&mygrid [x][y+1]  !='#'))
			return mydpArr[x][y]= dp(x+1,y) +dp (x,y+1);
		if(x+1<h&&mygrid [x+1][y]  !='#')
			return  mydpArr[x][y]= dp(x+1,y);
		return mydpArr[x][y]= dp (x,y+1);
			

	}
	public static void main(String[] args) throws IOException {
       //Scanner sc = new Scanner(System.in);
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
//        h = sc.nextInt();
//        w = sc.nextInt();
      StringTokenizer st =  new StringTokenizer(br.readLine());
        h=Integer.parseInt( st.nextToken());
       w= Integer.parseInt( st.nextToken());
        mygrid = new char [h][w];
       for(int i =0;i<h;i++) {
    	String s=br.readLine();
    	  for(int j =0;j<w;j++) {
    		  mygrid[i][j]= s.charAt(j);
    	  }
    	   
       }
       mydpArr = new long[h][w];
       for(long x[]: mydpArr) {
    	   Arrays.fill(x, -1);
       }
       
        pw.print((long)dp(0,0)%1000000007);
        pw.close();
        }
	  static class Scanner {
	         BufferedReader br;
	         StringTokenizer st;
	 
	         public Scanner(InputStream s) {
	             br = new BufferedReader(new InputStreamReader(s));
	         }
	 
	         public String next() throws IOException {
	             while (st == null || !st.hasMoreTokens())
	                 st = new StringTokenizer(br.readLine());
	             return st.nextToken();
	         }
	 
	         public int nextInt() throws IOException {
	             return Integer.parseInt(next());
	         }
	 
	         public long nextLong() throws IOException {
	             return Long.parseLong(next());
	         }
	 
	         public double nextDouble() throws IOException {
	             return Double.parseDouble(next());
	         }
	 
	         public int[] nextIntArr(int n) throws IOException {
	             int[] arr = new int[n];
	             for (int i = 0; i < n; i++) {
	                 arr[i] = Integer.parseInt(next());
	             }
	             return arr;
	         }
	 
	     }
}

Compiler output:
Main.java:4: error: class fib is public, should be declared in a file named fib.java
public class fib {
       ^
1 error
Language: Java


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;


public class Main {
	static long [][]dp;
	static char inp[][];
	static int h;
	static int w;
	public static long ans(int i ,int j) {
		if(i==h&&j==w)return 1;
		if(i>h||j>w)return 0;
		if(inp[i][j]=='#')return 0;
		if(dp[i][j]!=-1)
			return dp[i][j];
		long r=ans(i,j+1);
		long d=ans(i+1,j);	
		return dp[i][j]=(r+d)%((long)1e9+7);	
			
	}
	
	public static void main(String[] args) throws IOException {
        Scanner sc=new Scanner(System.in);
        PrintWriter pw =new PrintWriter(System.out);
        h=sc.nextInt()-1;
        w=sc.nextInt()-1;
        inp=new char[h+1][w+1];
        dp=new long [h+1][w+1];
        for(int i=0;i<=h;i++) {
        	StringBuilder s=new StringBuilder(sc.next());
        	for(int j=0;j<=w;j++) {
        		inp[i][j]=s.charAt(j);
                 }}
        for(long x[]:dp)
        	Arrays.fill(x, -1);
        pw.println(ans);
        pw.flush();
	
        
	}
	
	static class Scanner {
		 
		StringTokenizer st;
		BufferedReader br;
 
		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
 
		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
 
		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}

}


Compiler output:
Main.java:44: error: cannot find symbol
        pw.println(ans);
                   ^
  symbol:   variable ans
  location: class Main
1 error
Language: Java


import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;

import practice.sp2.Scanner;

public class Main {
	static long [][]dp;
	static char inp[][];
	static int h;
	static int w;
	static int total;
	static StringBuilder sb;
	public static long ans(int i ,int j) {
		if(i==h&&j==w)return 1;
		if(i>h||j>w)return 0;
		if(inp[i][j]=='#')return 0;
		if(dp[i][j]!=0)
			return dp[i][j];
		long r=ans(i,j+1);
		long d=ans(i+1,j);	
		return dp[i][j]=r+d;	
			
	}
	
	public static void main(String[] args) throws IOException {
        Scanner sc=new Scanner(System.in);
        PrintWriter pw =new PrintWriter(System.out);
        h=sc.nextInt()-1;
        w=sc.nextInt()-1;
        inp=new char[h+1][w+1];
        dp=new long [h+1][w+1];
        for(int i=0;i<=h;i++) {
        	String s=sc.next();
        	for(int j=0;j<=w;j++) {
        		inp[i][j]=s.charAt(j);
                 }}
       // for(long x[]:dp)
        //	Arrays.fill(x, -1);
        pw.println(ans(0,0)%((int)1e9+7));
        pw.flush();
	
        
	}
	
	static class Scanner {
		 
		StringTokenizer st;
		BufferedReader br;
 
		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
 
		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
 
		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}

}


Compiler output:
Main.java:12: error: package practice.sp2 does not exist
import practice.sp2.Scanner;
                   ^
1 error