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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
# define mod 1000000007
# define INF (1 << 29)
# define MAX_N 1000010
/* ちゃんと考えてわかって実装 */

int main(void){
    int h, w;
    cin >> h >> w;
    vector<string> A;
    for(int i=0; i<h; i++){
        string s; cin >> s;
        A.push_back(s);
    }

    // dp[i][j] = (1, 1) から (i, j)まで行く時の経路数 mod(10^9+7)
    int dp[h+1][w+1];
    for(int i=0; i<=h; i++) dp[i][0] = 0;
    for(int i=0; i<=w; i++) dp[0][i] = 0;

    dp[1][1] = 0;
    for(int i=1; i<=h; i++{
        for(int j=1; j<=w; j++){
            if(i!=1 && j!=1){
                if(A[i-1][j-1] == '#') dp[i][j] = 0;
                else dp[i][j] = (dp[i-1][j] + dp[i][j-1])%mod;
            }
        }
    }
    cout << dp[h][w] << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:27: error: expected ')' before '{' token
   24 |     for(int i=1; i<=h; i++{
      |        ~                  ^
      |                           )
Language: C++

#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define double long double
using datas=pair<ll,ll>;
using ddatas=pair<double,double>;
using tdata=pair<ll,datas>;
using vec=vector<ll>;
using mat=vector<vec>;
using pvec=vector<datas>;
using pmat=vector<pvec>;
#define For(i,a,b) for(i=a;i<(ll)b;i++)
#define bFor(i,a,b) for(i=a;i>=(ll)b;i--)
#define rep(i,N) For(i,0,N)
#define rep1(i,N) For(i,1,N)
#define brep(i,N) bFor(i,N-1,0)
#define all(v) (v).begin(),(v).end()
#define allr(v) (v).rbegin(),(v).rend()
#define vsort(v) sort(all(v))
#define vrsort(v) sort(allr(v))
#define endl "\n"
#define pb push_back
#define print(v) cout<<v<<endl
#define printyes cout<<"Yes"<<endl
#define printno cout<<"No"<<endl
#define printYES cout<<"YES"<<endl
#define printNO cout<<"NO"<<endl
#define output(v) do{bool f=0;for(auto outi:v){cout<<(f?" ":"")<<outi;f=1;}cout<<endl;}while(0)
const ll mod=1000000007;
const ll inf=1LL<<60;
const double PI = acos(-1);
const double eps = 1e-9;
template<class T> inline bool chmax(T& a,T b){bool x=a<b;if(x)a=b;return x;} 
template<class T> inline bool chmin(T& a,T b){bool x=a>b;if(x)a=b;return x;} 

void startupcpp(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout<<fixed<<setprecision(15);
}

double distance(ddatas x,ddatas y){
  double a=x.first-y.first,b=x.second-y.second;
  return sqrt(a*a+b*b);
}

ll modinv(ll a) {
  ll b=mod,u=1,v=0,t;
  while(b){
    t=a/b;
    a-=t*b; swap(a,b);
    u-=t*v; swap(u,v);
  }
  return (u+mod)%mod;
}

ll moddevide(ll a,ll b){return (a*modinv(b))%mod;}

vec modncrlistp,modncrlistm;

ll modncr(ll n,ll r){
  ll i,size=modncrlistp.size();
  if(size<=n){
    modncrlistp.resize(n+1);
    modncrlistm.resize(n+1);
    if(!size){
      modncrlistp[0]=modncrlistm[0]=1;
      size++;
    }
    For(i,size,n+1){
      modncrlistp[i]=modncrlistp[i-1]*i%mod;
      modncrlistm[i]=modinv(modncrlistp[i]);
    }
  }
  return modncrlistp[n]*modncrlistm[r]%mod*modncrlistm[n-r]%mod;
}

ll modpow(ll a,ll n){
  ll res=1;
  while(n){
    if(n&1)res=res*a%mod;
    a=a*a%mod;
    n>>=1;
  }
  return res;
}

ll gcd(ll a,ll b){if(!b)return a;return (a%b==0)?b:gcd(b,a%b);}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

ll countdigits(ll n){
  ll ans=0;
  while(n){n/=10;ans++;}
  return ans;
}

ll sumdigits(ll n){
  ll ans=0;
  while(n){ans+=n%10;n/=10;}
  return ans;
}

int main(){
  // startupcpp();
  // ll test;cin>>test;while(test--){
  ll i,j,H,W;
  cin>>H>>W;
  mat dp(H,vec(W,0));
  dp[0][0]=1;
  string s;
  rep(i,H){
    cin>>s;
    rep(j,W){
      if(s[i][j]='#')continue;
      if(i)dp[i][j]+=dp[i-1][j];
      if(j)dp[i][j]+=dp[i][j-1];
      dp[i][j]%=mod;
    }
  }
  cout<<dp[H-1][W-1]<<endl;
  return 0;
}

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

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

public class Grid1 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] input = br.readLine().split(" ");
        int H = Integer.parseInt(input[0]);
        int W = Integer.parseInt(input[1]);

        int dp[][] = new int[H + 1][W + 1];
        input = br.readLine().split("");

        for (int i = 0; i < W; i++) {
            if (input[i].equals("."))
                dp[1][i + 1] = 1;
            else break;
        }
        for (int i = 2; i <= H; i++) {
            input = br.readLine().split("");
            for (int j = 1; j <= W; j++) {
                if (input[j - 1].equals(".")) {
                    long x = dp[i - 1][j] + dp[i][j - 1];
                    x %= 1000000007;
                    dp[i][j] = (int)x;
                }
            }
        }
        System.out.println(dp[H][W]);
    }
}

Compiler output:
Main.java:5: 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>
#define int long long int
#define mod 1e9 + 7
using namespace std;


int h,w;
vector<vector<char>> grid;
vector<vector<int>> dp;

int func(int r, int c) {
	if(r>=h||r<0||c>=w||c<0) {
		return 0;
	}
	if(r==0&&c==0)
		return dp[0][0] = 1;
	if(dp[r][c]!=-1)
		return dp[r][c];
	if(grid[r][c]=='#')
		return dp[r][c] = 0;
	dp[r][c] = (func(r-1,c) + func(r,c-1))% mod;
	return dp[r][c];
}

signed main() {
	cin>>h>>w;
	grid.resize(h,vector<char>(w));
	dp.resize(h,vector<int>(w, -1));

	for(int i=0; i<h; i++) {
		for(int j=0;j<w;j++) {
			cin>>grid[i][j];
		}
	}
	cout<<func(h-1,w-1)<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'long long int func(long long int, long long int)':
a.cc:21:47: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   21 |         dp[r][c] = (func(r-1,c) + func(r,c-1))% mod;
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
      |                                 |
      |                                 long long int
Language: C++

#include <bits/stdc++.h>
#define int long long int
#define mod 10e9 + 7
using namespace std;


int h,w;
vector<vector<char>> grid;
vector<vector<int>> dp;

int func(int r, int c) {
	if(r>=h||r<0||c>=w||c<0) {
		return 0;
	}
	if(r==0&&c==0)
		return dp[0][0] = 1;
	if(dp[r][c]!=-1)
		return dp[r][c];
	if(grid[r][c]=='#')
		return dp[r][c] = 0;
	dp[r][c] = (func(r-1,c) + func(r,c-1))% mod;
	return dp[r][c];
}

signed main() {
	cin>>h>>w;
	grid.resize(h,vector<char>(w));
	dp.resize(h,vector<int>(w, -1));

	for(int i=0; i<h; i++) {
		for(int j=0;j<w;j++) {
			cin>>grid[i][j];
		}
	}
	cout<<func(h-1,w-1)<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'long long int func(long long int, long long int)':
a.cc:21:47: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   21 |         dp[r][c] = (func(r-1,c) + func(r,c-1))% mod;
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
      |                                 |
      |                                 long long int
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)

const int INF_32 = 1LL << 30;
const int64_t INF_64 = 1LL << 60;
const int MOD = 1000000007;

typedef long long ll;

ll GCD(ll a, ll b) { return b ? GCD(b, a % b) : a; }

ll LCM(ll x, ll y)
{
    return x * y / GCD(x, y);
}

typedef pair<int, int> P;

ll dp[1010][1010];
vector<string> a(1010);
// dp[i][j]は，(i,j)に至るまでの経路の数
int main()
{
    int H, W;
    cin >> H >> W;
    rep(i, H)
    {
        cin >> a.at(i);
    }

    dp[0][0] = 1;

    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            if (i + 1 < H) {
                if (a.at(i + 1).at(j) == '.') {
                    dp[i + 1][j] += dp[i][j];
                    dp[i + 1][j] %= MOD;
                }
            }
            if (j + 1 < W) {
                if (a.at(i).at(j + 1) == '.') {
                    dp[i][j + 1] += dp[i][j];
                    dp[i][j + 1] %= MOD;
                }
            }
        }
    }

    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   52 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

// https://atcoder.jp/contests/abc015/tasks/abc015_4

#include <bits/stdc++.h>

using namespace std;

#define ll long long 
#define REPL(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define radrad(a)  180.0 * a / M_PI
#define pow(x) x*x
static const int MAX = 10010;
static const ll INFTY = 1e12;
static const ll NUMMAX = 1000000007;
static const ll MOD = 1000000007;
#define LOOP 10000000
// 四方向への移動ベクトル
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

// 入力
int H, W;
vector<string> field;
int result = 100;
int dfs_res = 0;

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }


int main() {


    int H, W;
    cin >> H >> W;
    char grid[H][W];
    ll dp[H+10][W+10];
    //vector<int> dp(N+1, MAX);
    REP(i, H)REP(j, W){ cin >> grid[i][j]; }
    REP(i, H+1)REP(j, W+1){ dp[i][j] = 0; }

    dp[0][0] = 1;
    REP(i, H){
        REP(j, W){
            if(i == 0 && j == 0)/*dp[i][j] = 1*/;
            else if(i == 0){
                if(grid[i][j] == '#'){
                    dp[i][j] = 0;
                } else {
                    dp[i][j] = dp[i][j-1];
                }
            }else if(j == 0){
                if(grid[i][j] == '#'){
                    dp[i][j] = 0;
                } else {
                    dp[i][j] = dp[i-1][j];
                }
            }
            else {
                if(grid[i-1][j] == '#'){
                    dp[i][j] = dp[i][j-1];
                } else if(grid[i][j-1] == '#'){
                    dp[i][j] = dp[i-1][j];
                } else {
                    dp[i][j] = dp[i-1][j] + dp[i][j-1];
                }
           }
           dp[i][j] %= MOD;
        }
    }
    dp[i][j] %= MOD;
    //REP(i, H){
    //    REP(j, W){ 
    //        cout << dp[i][j] << " "; 
    //    }cout << endl; 
    //}

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

    return 0;
}
/*
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         pass System Test!
*/




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

#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int n,m;
string a[1010];
int dp[1010][1010];


int recur(int x, int y){
    if(x >= m || y >= n) return 0;
    if(x == m-1 && y == n-1) return 1;
    if(dp[x][y] != -1) return dp[x][y];
    else{
        int dp[x][y] = 0;
        if(a[x+1][y] == '.') dp[x][y] = recur(x+1,y) % MOD;
        if(a[x][y+1] == '.') dp[x][y] = recur(x,y + 1) % MOD;
        return dp[x][y] % MOD;
    }
}


int main(){
    cin>>n>>m;
    for(int i = 0 ; i < n; i++)cin>>a[i];
    memset(dp,-1,sizeof dp);
    cout<<recur(0,0);
}


Compiler output:
a.cc: In function 'int recur(int, int)':
a.cc:14:24: error: array must be initialized with a brace-enclosed initializer
   14 |         int dp[x][y] = 0;
      |                        ^
Language: Java

import java.util.*;
import java.io.*;
public class cf {
  public static void main(String[] args) throws IOException,InterruptedException{
	Scanner sc =new Scanner(System.in);
	PrintWriter pw = new PrintWriter(System.out);
	int n =sc.nextInt(),m=sc.nextInt();
	char [][] arr=new char[n][m];
	for (int i=0;i<n;++i)
		arr[i]=sc.next().toCharArray();
	long mod =(int)1e9+7;
	long [] [] poss=new long [n][m];
	poss[0][0]=1;
	for (int i =0;i<n;++i)
		for (int j=0;j<m;++j) {
			if (arr[i][j]=='#')
				continue;
			poss[i][j]+=((i-1>=0&&arr[i-1][j]=='.')?poss[i-1][j]:0)%mod;
			poss[i][j]+=((j-1>=0&&arr[i][j-1]=='.')?poss[i][j-1]:0)%mod;
		}
	//System.out.println(Arrays.deepToString(poss));
	pw.println(poss[n-1][m-1]%mod);
	pw.flush();
  }
  static long gcd (long a ,long b)
  {
	  return (b==0)?a:gcd(b, a%b);
  }
  static long [] gcd2 (long a ,long b) {
	  if (b==0)
		  return new long [] {a,1,0};
	  long [] val =gcd2(b, a%b);
	  long gcd =val[0];
	  long x =val[2],y=val[1]-(a/b)*val[2];
	  return new long [] {gcd,x,y};
  }
  static class Scanner {
		StringTokenizer stringTokenizer;	
		BufferedReader bfBufferedReader;
		public Scanner(InputStream system) {
			bfBufferedReader=new BufferedReader(new InputStreamReader( system));
		}
		 public Scanner(String file) throws Exception {
	            bfBufferedReader = new BufferedReader(new FileReader( file));
	        }			 
	        public String next() throws IOException {
	            while (stringTokenizer == null || !stringTokenizer.hasMoreTokens())
	                stringTokenizer = new StringTokenizer( bfBufferedReader.readLine());
	            return stringTokenizer.nextToken();
	        }
	 
	        public String nextLine() throws IOException {
	            return bfBufferedReader.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 bfBufferedReader.ready();
	        }
	 
	        public void waitForInput() throws InterruptedException {
	            Thread.sleep(3000);
	        }
  }
  }

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

import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
  int r=sc.nextInt();
  int c=sc.nextInt();
  char grid[][]=new char[r][c];
  char dp[][]=new char[r][c];
  for(int i=0;i<r;i++){
  for(int j=0;j<c;j++){
  grid[i][j]=sc.nextChar();
    if(grid[i][j]=='#')
      dp[i][j]=-1;
  }
  }
  dp[0][0]=1;
  
  for(int i=0;i<r;i++){
  for(int j=0;j<c;j++){
    if(i==0&&j==0)
      continue;
    if(dp[i][j]==-1)
      continue;
    
    if(j-1>=0&&dp[i][j-1]!=-1){
    dp[i][j]+=dp[i][j-1];
    }
    if(i-1>=0&&dp[i-1][j]!=-1){
    dp[i][j]+=dp[i-1][j];
    }
    
  }  
  }
  System.out.println(dp[r-1][c-1]);
}
}

Compiler output:
Main.java:11: error: cannot find symbol
  grid[i][j]=sc.nextChar();
               ^
  symbol:   method nextChar()
  location: variable sc of type Scanner
Main.java:13: error: incompatible types: possible lossy conversion from int to char
      dp[i][j]=-1;
               ^
2 errors
Language: C++

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

#define ll long long int
#define loop(i,s,e) for(ll i=s; i<e; i++)
#define endl '\n'
#define vll vector<ll>
#define pll pair<ll, ll>
#define ff first
#define ss second
#define bug(...)        __f (#__VA_ARGS__, __VA_ARGS__)
#define N 100001
#define pb push_back
#define INF LLONG_MAX
#define inf INT_MAX
#define minusinf INT_MIN
#define M (1000000000+7)

template <typename Arg1>
void __f (const char* name, Arg1&& arg1) { cout << name << " : " << arg1 << endl; }
template <typename Arg1, typename... Args>
void __f (const char* names, Arg1&& arg1, Args&&... args)
{
     const char* comma = strchr (names + 1, ',');
     cout.write (names, comma - names) << " : " << arg1 << " | "; __f (comma + 1, args...);
}

char arr[1001][1001];
ll n, m;

ll dp[1001][1001];

ll util(ll i, ll j){
	if(i>=n or j>=m or arr[i][j]=='#') return 0;

	if(dp[i][j]!=-1) return dp[i][j];

	if(i==n-1 and j==m-1) return 1;

	return dp[i][j] = util(i+1, j) + util(i, j+1) ;
}

void alpha(){

	cin>>n>>m;

	memset(dp, -1, sizeof(dp));

	loop(i,0,n){
		loop(j,0,m){
			cin>>arr[i][j];
		}
	}
	
	cout<<util(0,0)%M<<endl;
	
	return;

}

int main(){

	ios_base:: sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);

	#ifndef ONLINE_JUDGE


    ll t=1;
	//cin>>t;

  	while(t--) alpha();

	return 0;

}

Compiler output:
a.cc:66: error: unterminated #ifndef
   66 |         #ifndef ONLINE_JUDGE
Language: C++

#include <bits/stdc++.h>
#include <string>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
using namespace std;
//#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
//#define ordered_multiset tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
#define int long long
#define jai_shree_ram  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define rep(i, a, b, d) for (int i = a; i <= b; i += d)
#define brep(i, a, b, d) for (int i = a; i >= b; i -= d)
#define pb push_back
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define endl '\n'
const int MAX = 1e5 + 5;
const int MOD = 1e9 + 7;
////////////////////////////////

int dp[1005][1005];

int32_t main(){
    jai_shree_ram
    int n, m;
    cin >> n >> m;
    dp[1][1] = 1;
    rep(i,1,n,1){
        rep(j,1,m,1){
            char c;
            cin >> c;
            if(c == '.') {
                dp[i][j] += dp[i][j-1];
                dp[i][j]%=MOD;
                dp[i][j] += dp[i-1][j];
                dp[i][j]%=MOD;
        }
    }
    cout << dp[n][m] << endl;
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
 
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long
 
const int N=1005;
const int MOD=1e9+7;
 
int n, m;
char a[N][N];
int cache[N][N];
 
int dp(int i, int j)
{
	if(i>n || j>m)
		return 0;
	if(a[i][j]=='#')
		return 0;
	if(i==n && j==m)
		return 1;
	int &ans=cache[i][j];
	if(ans!=-1)
		return ans;
	ans=dp(i+1, j) + dp(i, j+1);
	ans%=MOD;
	return ans;
}
 
int32_t main()
{
	IOS;
	memset(cache, -1, sizeof(cache));
	cin>>n>>m;
	for(int i=1;i<=n;i++)
		for(int j=1;j<=m;j++)
			cin>>a[i][j];	
	int ans=dp(1, 1);
	cout<<ans;
	return 0;


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:41:18: error: expected '}' at end of input
   41 |         return 0;
      |                  ^
a.cc:32:1: note: to match this '{'
   32 | {
      | ^
Language: C++

#include <bits/stdc++.h>
#define pb push_back
#define INF 0x3f3f3f3
#define LINF 0x3f3f3f3f3f3f3f
#define MAXN int(10e3+3)
#define MOD int(10e9+7)
#define fim '\n'
#define ll long long
#define f first
#define s second
#define debug(x) cout << "DEBUG " << x << endl
using namespace std;
typedef pair<int, int> pii;

char m[MAXN][MAXN];
ll dp[MAXN][MAXN];

int main(){
	cin.tie(NULL);
	cout.tie(NULL);
	ios::sync_with_stdio(false);
	cin >> l >> c;
	
	for(int i = 1; i <= l; i++)
		for(int j = 1; j <= c; j++)
			cin >> m[i][j];
	
	dp[1][1] = 1;
	for(int i = 1; i <= l; i++)
		for(int j = 1; j<= c; j++) {
			if(i == 1 && j == 1) continue;
			if(m[i][j] != '#') dp[i][j] = dp[i-1][j]%MOD+dp[i][j-1]%MOD;
		}
		
	cout << dp[l][c]%MOD << fim;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: 'l' was not declared in this scope
   22 |         cin >> l >> c;
      |                ^
a.cc:22:21: error: 'c' was not declared in this scope
   22 |         cin >> l >> c;
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int c=0;
void dfs(vector<int>v[],int *b,int pos, int *vis)
{
	vis[pos]=1;
	for(int i=0;i<v[pos].size();i++)
	{
		if(vis[v[pos][i]]==0)
			dfs(v,b,v[pos][i],vis);
		b[pos]=max(b[pos],1+b[v[pos][i]]);
	}
	
}
 int main()
 {
 	int n,m;
 	cin>>n>>m;
 	if(n==1 && m==1)
 	{
 		cout<<1<<endl;
 		return;
 	}
 	char a[n+1][m+1];
 	long long int v[n+1][m+1];
 	memset(v,0,sizeof(v));
 	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++)
 	{
 		for(int j=1;j<=m;j++)
 		{
 			if(a[i][j]=='#')
 			{
 				continue;
 			}
 			else
 			{
 				v[i][j]++;
 				if(i+1<=n && a[i+1][j]!='#')
 					v[i+1][j]++;
 			}
 		}
 	}
 	cout<<v[n][m]%1000000007<<endl;
 }

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

import java.util.*;

import java.io.*;

public class P3 {
	
	static long[][] memo;
	static char[][] grids;
	static int n , m;
	
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		String[] inp = br.readLine().split(" ");
		 n = Integer.parseInt(inp[0]);
		 m = Integer.parseInt(inp[1]);
		grids = new char[n][m];
		for(int i=0;i<n;i++)
		{
			String s=br.readLine();
			for(int j=0;j<m;j++)grids[i][j]=s.charAt(j);
		}
		memo = new long[n][m];
		for(int i=0;i<n;i++)
			for(int j=0;j<m;j++)memo[i][j]=-1;
		System.out.println(dp(0,0));
		
		
		pw.flush();
		pw.close();
	}
	
	public static long dp(int i , int j)
	{
		if(i==n-1 && j==m-1)return 1;
		if(valid(i,j) && memo[i][j]!=-1) return memo[i][j];
		int temp=0;
		if(valid(i+1,j)) {
			temp+=dp(i+1,j);
		}
		if(valid(i,j+1)) temp+=dp(i,j+1);
		return memo[i][j]=temp%=((int)1e9+7);
		
	}
	
	
	public static boolean valid(int i , int j)
	{
		return (i>=0) && (i<n) && (j>=0) && (j<m) && (grids[i][j]=='.');
	}
	

}


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

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


public class Grid {

	public static void main(String[] args) throws IOException {
		BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw =new PrintWriter(System.out);
		StringTokenizer st= new StringTokenizer(br.readLine());
		int H=Integer.parseInt(st.nextToken());
		int W=Integer.parseInt(st.nextToken());
		char[][] grid= new char[H][W];
		long[][] solution= new long[H][W];
		for (int i = 0; i < grid.length; i++) {
			String s=br.readLine();
			for (int j = 0; j < grid[i].length; j++) {
				grid[i][j]=s.charAt(j);
	
			}
		}
		for (int i = solution.length-1; i > -1; i--) {
			for (int j = solution[i].length-1; j > -1; j--) {
				if(grid[i][j]=='#')
				{
					solution[i][j]=0;
				}
				else if(i+1>=solution.length && j+1>=solution[i].length)
				{
					solution[i][j]=1;
				}
				else if(i+1>=solution.length)
				{
					solution[i][j]=solution[i][j+1];
				}
				else if(j+1>=solution[i].length)
				{
					solution[i][j]=solution[i+1][j];
				}
				else
				{
					solution[i][j]=(solution[i][j+1]+solution[i+1][j])%(1000000000+7);
				}
					
					
			}
		}
		pw.println(solution[0][0]%(1000000000+7));
		pw.close();
	}
}


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

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


public class Grid {

	public static void main(String[] args) throws IOException {
		BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw =new PrintWriter(System.out);
		StringTokenizer st= new StringTokenizer(br.readLine());
		int H=Integer.parseInt(st.nextToken());
		int W=Integer.parseInt(st.nextToken());
		char[][] grid= new char[H][W];
		long[][] solution= new long[H][W];
		for (int i = 0; i < grid.length; i++) {
			String s=br.readLine();
			for (int j = 0; j < grid[i].length; j++) {
				grid[i][j]=s.charAt(j);
				grid[i][j]='.';
			}
		}
		for (int i = solution.length-1; i > -1; i--) {
			for (int j = solution[i].length-1; j > -1; j--) {
				if(grid[i][j]=='#')
				{
					solution[i][j]=0;
				}
				else if(i+1>=solution.length && j+1>=solution[i].length)
				{
					solution[i][j]=1;
				}
				else if(i+1>=solution.length)
				{
					solution[i][j]=solution[i][j+1];
				}
				else if(j+1>=solution[i].length)
				{
					solution[i][j]=solution[i+1][j];
				}
				else
				{
					solution[i][j]=solution[i][j+1]+solution[i+1][j];
				}
					
					
			}
		}
		pw.println(solution[0][0]%(1000000000+7));
		pw.close();
	}
}


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



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

public class Main{
	static int H;
	static int W;
	static int[][]memo;
	static int dp(char[][] grid, int i, int j) {
		if(memo[i][j]!=-1)
			return memo[i][j];
		if (i == H - 1 && j == W - 1) {
			return 1;
		}
		if(grid[i][j]=='#')
			return 0;
		if (i == H - 1)
			if (grid[i][j + 1] == '#')
				return memo[i][j] = 0;
			else
				return memo[i][j] = dp(grid, i, j + 1);
		if (j == W - 1)
			if (grid[i + 1][j] == '#')
				return memo[i][j] = 0;
			else
				return memo[i][j] = dp(grid, i + 1, j);
		if (grid[i + 1][j] == '#' && grid[i][j + 1] == '#')
			return 0;
		return memo[i][j] = dp(grid, i + 1, j) + dp(grid, i, j + 1);

	}

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		H = sc.nextInt();
		W = sc.nextInt();
		char[][] grid = new char[H][W];
		memo = new int[H][W];
		for(int[]arr : memo)
			Arrays.fill(arr, -1);
		for (int i = 0; i < H; i++) {
			String str = sc.next();
			for (int j = 0; j < W; j++) {
				grid[i][j] = str.charAt(j);
			}
		}
		System.out.println((int)((dp(grid, 0, 0))%(Math.pow(10,9)+7)));
	}
}


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

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

int h, w;
char path[1001][1001];
long long  memo[1001][1001];
long long numberofpath(int i, int j)
{
	long long answer = 0; 
	if (i < 0 || j < 0 || i == h || j == w) return 0;
	else if (i == h-1 && j == w-1) return 1;
	else if (path[i][j] == '#') return 0; 
	else
	{
		if (memo[i][j] != -1) return memo[i][j];
		else
		{
			answer = (answer +  numberofpath(i + 1, j )) % (long long)(1e9+7);
			answer = (answer + numberofpath(i, j+1)) % (long long)(1e9 + 7);
		}
	}

	return memo[i][j] = answer;
}


int main()
{
	memset(memo,-1, sizeof memo);
	cin >> h >> w; 
	for (int i = 0; i < h; i += 1)
		for (int j = 0; j < w; j++)
			cin >> path[i][j];

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

	system("pause");
}


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

#include<iostream>
#include<cmath>
#include<algorithm>

using namespace std;

int h, w;
char path[1001][1001];
long long  memo[1001][1001];
long long numberofpath(int i, int j)
{
	long long answer = 0; 
	if (i < 0 || j < 0 || i == h || j == w) return 0;
	else if (i == h-1 && j == w-1) return 1;
	else if (path[i][j] == '#') return 0; 
	else
	{
		if (memo[i][j] != -1) return memo[i][j];
		else
		{
			answer = (answer +  numberofpath(i + 1, j )) % (long long)(1e9+7);
			answer = (answer + numberofpath(i, j+1)) % (long long)(1e9 + 7);
		}
	}

	return memo[i][j] = answer;
}


int main()
{
	memset(memo,-1, sizeof memo);
	cin >> h >> w; 
	for (int i = 0; i < h; i += 1)
		for (int j = 0; j < w; j++)
			cin >> path[i][j];

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

	system("pause");
}


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

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

int h, w;
char path[1001][1001];
long long  memo[1001][1001];
long long numberofpath(int i, int j)
{
	long long answer = 0; 
	if (i < 0 || j < 0 || i == h || j == w) return 0;
	else if (i == h-1 && j == w-1) return 1;
	else if (path[i][j] == '#') return 0; 
	else
	{
		if (memo[i][j] != -1) return memo[i][j];
		else
		{
			answer = (answer +  numberofpath(i + 1, j )) % long long(10e9+7);
			answer = (answer + numberofpath(i, j+1)) % long long(10e9 + 7);
		}
	}

	return memo[i][j] = answer;
}


int main()
{
	memset(memo,-1, sizeof memo);
	cin >> h >> w; 
	for (int i = 0; i < h; i += 1)
		for (int j = 0; j < w; j++)
			cin >> path[i][j];

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

	
}


Compiler output:
a.cc: In function 'long long int numberofpath(int, int)':
a.cc:21:72: error: expected primary-expression before 'long'
   21 |                         answer = (answer +  numberofpath(i + 1, j )) % long long(10e9+7);
      |                                                                        ^~~~
a.cc:22:68: error: expected primary-expression before 'long'
   22 |                         answer = (answer + numberofpath(i, j+1)) % long long(10e9 + 7);
      |                                                                    ^~~~
Language: C++

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

int h, w;
char path[1001][1001];
long long  memo[1001][1001];
long long numberofpath(int i, int j)
{
	long long answer = 0; 
	if (i < 0 || j < 0 || i == h || j == w) return 0;
	else if (i == h-1 && j == w-1) return 1;
	else if (path[i][j] == '#') return 0; 
	else
	{
		if (memo[i][j] != -1) return memo[i][j];
		else
		{
			answer = (answer +  numberofpath(i + 1, j )) % (10e9+7);
			answer = (answer + numberofpath(i, j+1)) % (10e9 + 7);
		}
	}

	return memo[i][j] = answer;
}


int main()
{
	memset(memo,-1, sizeof memo);
	cin >> h >> w; 
	for (int i = 0; i < h; i += 1)
		for (int j = 0; j < w; j++)
			cin >> path[i][j];

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

	
}


Compiler output:
a.cc: In function 'long long int numberofpath(int, int)':
a.cc:21:70: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   21 |                         answer = (answer +  numberofpath(i + 1, j )) % (10e9+7);
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~
      |                                          |                                  |
      |                                          long long int                      double
a.cc:22:66: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   22 |                         answer = (answer + numberofpath(i, j+1)) % (10e9 + 7);
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
      |                                          |                               |
      |                                          long long int                   double
Language: C++

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

int h, w;
char path[1001][1001];
long long  memo[1001][1001];
long long numberofpath(int i, int j)
{
	long long answer = 0; 
	if (i < 0 || j < 0 || i == h || j == w) return 0;
	else if (i == h-1 && j == w-1) return 1;
	else if (path[i][j] == '#') return 0; 
	else
	{
		if (memo[i][j] != -1) return memo[i][j];
		else
		{
			answer = (answer +  numberofpath(i + 1, j )) % long long (10e9+7);
			answer = (answer + numberofpath(i, j+1)) % long long(10e9 + 7);
		}
	}

	return memo[i][j] = answer;
}


int main()
{
	memset(memo,-1, sizeof memo);
	cin >> h >> w; 
	for (int i = 0; i < h; i += 1)
		for (int j = 0; j < w; j++)
			cin >> path[i][j];

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

	
}


Compiler output:
a.cc: In function 'long long int numberofpath(int, int)':
a.cc:21:72: error: expected primary-expression before 'long'
   21 |                         answer = (answer +  numberofpath(i + 1, j )) % long long (10e9+7);
      |                                                                        ^~~~
a.cc:22:68: error: expected primary-expression before 'long'
   22 |                         answer = (answer + numberofpath(i, j+1)) % long long(10e9 + 7);
      |                                                                    ^~~~
Language: C++

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

int h, w;
char path[1001][1001];
long long  memo[1001][1001];
long long numberofpath(int i, int j)
{
	long long answer = 0; 
	if (i < 0 || j < 0 || i == h || j == w) return 0;
	else if (i == h-1 && j == w-1) return 1;
	else if (path[i][j] == '#') return 0; 
	else
	{
		if (memo[i][j] != -1) return memo[i][j];
		else
		{
			answer = (answer +  numberofpath(i + 1, j )) % long long (10e9+7);
			answer = (answer + numberofpath(i, j+1)) % long long(10e9 + 7);
		}
	}

	return memo[i][j] = answer;
}


int main()
{
	memset(memo,-1, sizeof memo);
	cin >> h >> w; 
	for (int i = 0; i < h; i += 1)
		for (int j = 0; j < w; j++)
			cin >> path[i][j];

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

	
}


Compiler output:
a.cc: In function 'long long int numberofpath(int, int)':
a.cc:20:72: error: expected primary-expression before 'long'
   20 |                         answer = (answer +  numberofpath(i + 1, j )) % long long (10e9+7);
      |                                                                        ^~~~
a.cc:21:68: error: expected primary-expression before 'long'
   21 |                         answer = (answer + numberofpath(i, j+1)) % long long(10e9 + 7);
      |                                                                    ^~~~
a.cc: In function 'int main()':
a.cc:31:9: error: 'memset' was not declared in this scope
   31 |         memset(memo,-1, sizeof memo);
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<algorithm>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

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

int h, w;
char path[1001][1001];
long long  memo[1001][1001];
long long numberofpath(int i, int j)
{
	long long answer = 0; 
	if (i < 0 || j < 0 || i == h || j == w) return 0;
	else if (i == h-1 && j == w-1) return 1;
	else if (path[i][j] == '#') return 0; 
	else
	{
		if (memo[i][j] != -1) return memo[i][j];
		else
		{
			answer = (answer +  numberofpath(i + 1, j )) % long long (10e9+7);
			answer = (answer + numberofpath(i, j+1)) % long long(10e9 + 7);
		}
	}

	return memo[i][j] = answer;
}


int main()
{
	memset(memo,-1, sizeof memo);
	cin >> h >> w; 
	for (int i = 0; i < h; i += 1)
		for (int j = 0; j < w; j++)
			cin >> path[i][j];

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

	
	system("pause");
}


Compiler output:
a.cc: In function 'long long int numberofpath(int, int)':
a.cc:20:72: error: expected primary-expression before 'long'
   20 |                         answer = (answer +  numberofpath(i + 1, j )) % long long (10e9+7);
      |                                                                        ^~~~
a.cc:21:68: error: expected primary-expression before 'long'
   21 |                         answer = (answer + numberofpath(i, j+1)) % long long(10e9 + 7);
      |                                                                    ^~~~
a.cc: In function 'int main()':
a.cc:31:9: error: 'memset' was not declared in this scope
   31 |         memset(memo,-1, sizeof memo);
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<algorithm>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include<cstdio>
#include<algorithm>
#include<utility>
#include<queue>
#include<cmath>
#include<functional>
#include<vector>
#define N 1005
#define int long long
using namespace std;
char a[N][N],f[N][N];
signed main()
{
    int h,w;
    scanf("%d %d",&h,&w);
    for(int i=0;i<h;i++)cin>>a[i];
    //f[i][j]=f[i-1][j],f[i][j-1]
    printf("%d",f[h][w]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: 'cin' was not declared in this scope
   16 |     for(int i=0;i<h;i++)cin>>a[i];
      |                         ^~~
a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    6 | #include<functional>
  +++ |+#include <iostream>
    7 | #include<vector>
Language: C++

5 5
..#..
.....
#...#
.....
..#..

Compiler output:
a.cc:2:3: error: stray '#' in program
    2 | ..#..
      |   ^
a.cc:4:2: error: invalid preprocessing directive #...
    4 | #...#
      |  ^~~
a.cc:6:3: error: stray '#' in program
    6 | ..#..
      |   ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 5 5
      | ^
Language: C++

#include<bits/stdc++.h>
using namesapce std;
long long int way[1001][1001];
int main(){
int H,W;
  cin>>H>>W;
  char a[H][W];
  for(int i=0;i<H;i++)
    for(int j=0;j<W;j++)
      cin>>a[i][j];
  for(int i=1;i<=H;i++)
  {  
    if(a[i-1][0]=='#')
      break;
    way[i][1]=1;}
   for(int i=1;i<=W;i++)
  {  
    if(a[0][i-1]=='#')
      break;
    way[1][i]=1;}
  for(int i=2;i<=H;i++)
  {
		for(int j=2;j<=W;j++)
        {
			way[i][j]=way[i-1][j]+way[i][j-1];
        }
  }
  cout<<way[H][W]%1e9+7;
    
  
  

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>H>>W;
      |   ^~~
      |   std::cin
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:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:28:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   28 |   cout<<way[H][W]%1e9+7;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:28:18: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   28 |   cout<<way[H][W]%1e9+7;
      |         ~~~~~~~~~^~~~
      |                 | |
      |                 | double
      |                 long long int
a.cc:28:25: error: expected '}' at end of input
   28 |   cout<<way[H][W]%1e9+7;
      |                         ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    
            Scanner sc = new Scanner(System.in);
        int H = sc.nextInt();
        int W = sc.nextInt();

        boolean[][] grid = new boolean[H][W];
        for (int i = 0; i < H; i++) {
            String row = sc.next();
            int j = 0;
            for (char ch : row.toCharArray()) {
                grid[i][j] = ch == '.';
                j++;
            }
        }

        grid[0][0] = true;
        grid[H-1][W-1] = true;

        long[][] dp = new long[H][W];
        dp[0][0] = 1;

        for (int i = 1; i < W; i++) {
            if (grid[0][i]) {
                dp[0][i] = 1;
            } else {
                break;
            }
        }
        for (int i = 1; i < H; i++) {
            if (grid[i][0]) {
                dp[i][0] = 1;
            } else {
                break;
            }
        }

//        print(dp);

        for (int i = 1; i < H; i++) {
            for (int j = 1; j < W; j++) {
                if (grid[i][j]) {
                    dp[i][j] = dp[i - 1][j] + dp[i][j - 1] ;
//                    dp[i][j] = (dp[i - 1][j] + dp[i][j - 1])% 1000_000_007;
                } else {
                    dp[i][j] = 0;
                }
            }
        }

//        print(dp);

//        long res = dp[H-1][W-1];
        System.out.println(res % 1000_000_007);
//        System.out.println(res);

    
  }
}


Compiler output:
Main.java:57: error: cannot find symbol
        System.out.println(res % 1000_000_007);
                           ^
  symbol:   variable res
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {

	// your code goes here	long long modulo = 1000000007;

	long long h, w;

	cin >> h >> w;

	char grid[h][w];

	long long dp[h][w];

	for(long long i=0; i<h; i++) {

		for(long long j=0; j<w; j++) {

			cin >> grid[i][j];

			dp[i][j] = 0;

		}

	}

	for(long long i=0; i<h && grid[i][0]=='.'; i++) {

		dp[i][0] = 1;

	}

	for(long long i=0; i<w && grid[i][0]=='.'; i++) {

		dp[0][i] = 1;

	}

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

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

			if(grid[i][j] == '.') {

				dp[i][j] = (dp[i-1][j]+dp[i][j-1])%modulo;

			}

		}

	}

	cout << dp[h-1][w-1] << endl;

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:68: error: 'modulo' was not declared in this scope; did you mean 'modfl'?
   47 |                                 dp[i][j] = (dp[i-1][j]+dp[i][j-1])%modulo;
      |                                                                    ^~~~~~
      |                                                                    modfl
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#if defined(__unix__) || defined(__APPLE__)
#include <sys/resource.h>
#endif

using namespace std;
vector<vector<unsigned int>> dp;
vector<string> a;
int H, W;
#define MAX (1000000000+7)
bool solve(int r, int c)
{
	bool ret = true;
	if((r==H-1) && (c==W-1))
		return true;
	
	// Right move
	if((c+1 < W) && (a[r][c+1]=='.'))// Move is possible
	{
		if((dp[r][c+1]!=0) || (solve(r, c+1))) //Either we already have solved or solve return true
			dp[r][c] += dp[r][c+1];
		else
			ret |= false;
	}
	if(dp[r][c] >=MAX)
		dp[r][c] -= MAX;
	
	//Down Move			
	if((r+1 < H)&& (a[r+1][c]=='.'))
	{
		if((dp[r+1][c]!=0) || (solve(r+1, c)))//Either we already have solved or solve return true
			dp[r][c] += dp[r+1][c];
		else
			ret |= false;
	}
	if(dp[r][c] >=MAX)
		dp[r][c] -= MAX;
	return ret;	
}
int main(int argc, char*argv[])
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
	cin >> H >> W;
	
	a.reserve(H);
	dp.reserve(H);
	for (int i = 0; i< H; i++)
	{
		string s;
		cin >> s;
		a.push_back(s);
		dp[i].assign(W, 0);
	}
	dp[H-1][W-1] = 1;
	solve(0, 0);
	if(dp[r][c] >=MAX)
		dp[r][c] -= MAX;
	cout <<dp[0][0];
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:59:15: error: 'r' was not declared in this scope
   59 |         if(dp[r][c] >=MAX)
      |               ^
a.cc:59:18: error: 'c' was not declared in this scope
   59 |         if(dp[r][c] >=MAX)
      |                  ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

const int mod = 1e9 + 7;

int dfs (const vector <vector <char>> &grid, int row, int col,
         vector <vector <int>> &ways) {
    if (row == grid.size() - 1 && col == grid[0].size() - 1) {
        return 1;
    }
    if (row >= grid.size() || col >= grid[row].size() || grid[row][col] == '#') {
        return 0;
    }

    if (ways[row][col] > 0) {
        return ways[row][col];
    }
    int count = 0;
    for (const pair <int, int> &next : initializer_list <pair <int, int>> 
                                            {{row + 1, col}, {row, col + 1}}) {
        int r = next.first, c = next.second;
        count = ((count % mod) + (dfs(grid, r, c, ways) % mod)) % mod;
    }
    ways[row][col] = count;
    return ways[row][col];
}

int getNumWays (vector <vector <char>> &grid) {
    if (grid.empty()) {
        return 0;
    }
    int rows = grid.size(), cols = grid[0].size();
    vector <vector <int>> ways(rows, vector <int>(cols));
    int count = dfs(grid, 0, 0, ways);
    display(ways);
    return count;
}

int  main () {
    int rows, cols;
    cin >> rows >> cols;
    vector <vector <char>> grid(rows, vector <char>(cols, '.'));

    for (int r = 0; r < rows; ++r) {
        for (int c = 0; c < cols; ++c) {
            char ch;
            cin >> ch;
            grid[r][c] = ch;
        }
    }
    // display(grid);
    cout << getNumWays(grid) << "\n";
    return 0;
}

Compiler output:
a.cc: In function 'int getNumWays(std::vector<std::vector<char> >&)':
a.cc:37:5: error: 'display' was not declared in this scope
   37 |     display(ways);
      |     ^~~~~~~
Language: C++

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    static int mod = (int)Math.pow(10, 9) + 1;
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        int rows = scanner.nextInt();
        int cols = scanner.nextInt();
        List<String> grid = new ArrayList<>();
        for (int i = 0; i < rows; i++) {
            grid.add(scanner.next());
        }
        int curent[] = new int[cols+1];
        int previous[] = new int[cols+1];
        previous[cols-1] = 1;
        for (int i = rows-1; i >= 0; i--) {
            for (int j = cols-1; j >= 0; j--) {
                if (grid.get(i).charAt(j) == '#') {
                    curent[j] = 0;
                    continue;
                }
                curent[j] = (curent[j+1] + previous[j])%mod;
            }
            int temp[] = curent;
            curent = previous;
            previous = temp;
        }
        System.out.println(previous[0]);
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.ArrayList;
      | ^~~~~~
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.util.List;
      | ^~~~~~
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.util.Scanner;
      | ^~~~~~
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 class Main {
      | ^~~~~~