criyle/codenet-compile-errors huggingface dataset:
Language: Java

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

public class Train {
	static int H, W;
	static char arr[][];
	static long dp[][];

	public static long dp(int i, int j) {
		if (i == H - 1 && j == W - 1) {
			return 1;
		}
		if (arr[i][j] == '#') {
			return 0;
		}
		if (dp[i][j] != -1) {
			return dp[i][j];
		}
		long down = 0;
		long right = 0;
		if (i != H - 1) {
			down = dp(i + 1, j);
		}
		if (j != W - 1) {
			right = dp(i, j + 1);
		}
		return dp[i][j] = (down%((int)1e9+7) + right%((int)1e9+7))%((int)1e9+7);
	}

	public static void main(String[] args) throws IOException {

		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		H = sc.nextInt();
		W = sc.nextInt();
		dp = new long[H + 1][W + 1];
		for (int f = 0; f < H + 1; f++) {
			Arrays.fill(dp[f], -1);
		}
		arr = new char[H + 1][W + 1];
		for (int i = 0; i < H; i++) {
			String str = sc.nextLine();
			for (int j = 0; j < W; j++) {
				arr[i][j] = str.charAt(j);
			}
		}
		out.println(dp(0, 0) % 1000000007);
		// b7ebak ya Eshiba
		out.flush();
		out.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		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 String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}
}

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

#include<bits/stdc++.h>
using namespace std;
#define MOD 1e9+7
int main()
{
  int n,m;
  cin >> n >> m;
  vector<vector<char> > grid(n,vector<char>(m));
  for(int i =0;i<n;i++)
  {
    for(int j = 0;j < m;j++)
    {
      cin >> grid[i][m];
    }
  }
  vector<vector<long long> > dp(n,vector<long long>(m));
  dp[0][0] = 1;
  for(int i = 1;i<n;i++)
  {
    if(grid[i][0] == '#')
     	dp[i][0] = 0;
    else
    	dp[i][0] = dp[i-1][0];
  }
  for(int i = 1;i<m;i++)
  {
    if(grid[0][i] == '#')
     	dp[0][i] = 0;
    else
    	dp[0][i] = dp[0][i-1];
  }
  for(int i =1;i<n;i++)
  {
    for(int j = 1;j<m;j++)
    {
      if(grid[i][j] == '#')
        dp[i][j] = 0;
      else
        dp[i][j] = dp[i-1][j] + dp[i-1][j];
    }
  }
  cout << (dp[n-1][m-1]%MOD) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:24: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} and 'double' to binary 'operator%'
   42 |   cout << (dp[n-1][m-1]%MOD) << endl;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n, m;
long long mod = 1000000009;
int path( vector<vector<char>> arr(n, vector<char>(m))){
    int dp[n][m]={0};
    dp[0][0] = 1;
    for(int i=0; i<n; i++){
        for(int j=0; j<m; j++){
            if(i==0 && arr[i][j]!="#"){
                dp[i][j]= 1 + dp[i][j-1];
            }
            else if(j==n-1 && arr[i][j]!="#"){
                dp[i][j]= 1 + dp[i-1][j];
            }
            else if(arr[i][j]!="#"){
                dp[i][j]= dp[i-1][j] + dp[i][j-1];
            }
        }
    }
    return arr[n-1][m-1]%mod;
}
int main() {
    cin>> n>>m;
    vector<vector<char>> arr(n, vector<char>(m));
    for(int i=0; i<n; i++){
        for(int j=0; j<m; j++){
            cin>>arr[i][j];
        }
    }
    return path(arr, n, m);
}


Compiler output:
a.cc:5:35: error: expected ',' or '...' before '(' token
    5 | int path( vector<vector<char>> arr(n, vector<char>(m))){
      |                                   ^
a.cc: In function 'int path(std::vector<std::vector<char> >)':
a.cc:10:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |             if(i==0 && arr[i][j]!="#"){
a.cc:13:40: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |             else if(j==n-1 && arr[i][j]!="#"){
a.cc:16:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |             else if(arr[i][j]!="#"){
a.cc: In function 'int main()':
a.cc:31:16: error: too many arguments to function 'int path(std::vector<std::vector<char> >)'
   31 |     return path(arr, n, m);
      |            ~~~~^~~~~~~~~~~
a.cc:5:5: note: declared here
    5 | int path( vector<vector<char>> arr(n, vector<char>(m))){
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define N 1000
int a[N+5][N+5];
int main() {
  	int n,m; char x;
  	cin>>n>>m;
  	for(int i=1;i<=n;i++) {
    	for(int j=1;j<=m;j++) {
        	cin>>x;
          	a[i][j]=(x=='.')?1:0;
        }
    }
  	int dp[n+1][m+1];
  	for(int i=0;i<=n;i++) {
    	for(int j=0;j<=m;j++) {
        	if(i==0 || j==0) {dp[i][j]=0;}
          	if(i==1 && j==1) {dp[i][j]=1;}
          	else if(a[i][j]==1) {dp[i][j]=(dp[i-1][j]%inf + dp[i][j-1]%inf)%inf;}
          	else {dp[i][j]=0;}
        }
    }
  	cout<<dp[n][m]%inf<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:59: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   19 |                 else if(a[i][j]==1) {dp[i][j]=(dp[i-1][j]%inf + dp[i][j-1]%inf)%inf;}
      |                                                           ^~~
      |                                                           ynf
a.cc:23:24: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   23 |         cout<<dp[n][m]%inf<<endl;
      |                        ^~~
      |                        ynf
Language: C++

#include <bits/stdc++.h> 
using namespace std; 
typedef long long int ll;
ll bogo[1002][1002];
ll arr[1002][1002];
ll dp(ll n,ll m ,ll x,ll y)
{
    if(x==n&&y==m)return 1;
    else{
        if(bogo[x][y]==-1){
        ll cal=0;
        if(arr[x+1][y]==21){
            cal+= dp(n,m,x+1,y);
        }
        if(arr[x][y+1]==21){
            cal+= dp(n,m,x,y+1);
        }
        bogo[x][y]=cal;
        return cal;
    }
        return bogo[x][y]%%1000000007;
    }
}
int main() {
    ios_base::sync_with_stdio(false); 
    cin.tie(NULL);
    memset(bogo,-1,1002*1002*sizeof(bogo[0][0]));
    ll n,m;
    cin>>n>>m;

    for (int i = 1; i <= n; ++i)
    {
        for (int j= 1; j <= m; ++j)
        {
           char temp;
           cin>>temp;
           if(temp=='.'){
            arr[i][j]=21;
           }
           if(temp=='#'){
            arr[i][j]=1;
           }
        }
    }
   cout<< dp(n,m,1,1)%1000000007;
}

Compiler output:
a.cc: In function 'll dp(ll, ll, ll, ll)':
a.cc:21:27: error: expected primary-expression before '%' token
   21 |         return bogo[x][y]%%1000000007;
      |                           ^
Language: C++

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

int total_ways = 0;
bool solveGrid(int mat[1000][1000] ,int m ,int n, int i,int j){
 	// Base Case
  	if(i==m && j==n){
    	total_ways++;
      	return false;
    }
  	if(i==m || j==n){
    	return false;
    }
  	// Self Work
  	if(mat[i][j]=='#'){
    	return false;
    }
  	// Recursive Case
  	bool right = solveGrid(mat,m,n,i,j+1);
  	bool down = solveGrid(mat,m,n,i+1,j);
  	if(right || down){
    	return true;
    }
  	return false;
}

int main(){
 	int m,n;
  	cin>>m>>n;
  	char mat[1000][1000];
  	for(int i=0;i<m;i++){
      	for(int j=0;j<n;j++){
          	cin>>mat[i][j];
        }
    }
  	solveGrid(mat,m-1,n-1,0,0);
  	cout<<total_ways;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepspace'
    2 | using namepspace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:29:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   29 |         cin>>m>>n;
      |         ^~~
      |         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:36:19: error: cannot convert 'char (*)[1000]' to 'int (*)[1000]'
   36 |         solveGrid(mat,m-1,n-1,0,0);
      |                   ^~~
      |                   |
      |                   char (*)[1000]
a.cc:5:20: note:   initializing argument 1 of 'bool solveGrid(int (*)[1000], int, int, int, int)'
    5 | bool solveGrid(int mat[1000][1000] ,int m ,int n, int i,int j){
      |                ~~~~^~~~~~~~~~~~~~~
a.cc:37:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   37 |         cout<<total_ways;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

/* code of Ayush Tiwari
    codeforces- servermonk
    codechef- ayush572000
*/

#include <bits/stdc++.h>
#define ll long long

//STL
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define mp make_pair
#define all(v) v.begin(), v.end()

//loops
#define forn(i,a,b) for(int i=a;  i<b; i++)
#define rforn(i,a,b) for(int i=a; i>=b; i--)

// defined values
#define maxn 2004
#define Mod 1000000007

// fast io
#define FIO() ios_base::sync_with_stdio(0);cin.tie(0);


using namespace std;

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

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

void solution(){

    // This is the main code
    cin>>n>>m;
    memset(dp,-1,sizeof(dp))
    forn(i,0,n){
        forn(j,0,m) cin>>a[i][j];
    }
    cout<<dfs(0,0)%Mod;
    
}


int main(){
    
    #ifndef ONLINE_JUDGE
    freopen("E:/CP/input.txt","r",stdin);
    freopen("E:/CP/output.txt","w",stdout);
    #endif  
    
    FIO()   
    
    ll t=1;
    //cin>>t;
    while (t--)
    {
        solution();
    }
    return 0;
}

Compiler output:
a.cc: In function 'void solution()':
a.cc:47:29: error: expected ';' before 'for'
   47 |     memset(dp,-1,sizeof(dp))
      |                             ^
      |                             ;
a.cc:48:10: error: 'i' was not declared in this scope
   48 |     forn(i,0,n){
      |          ^
a.cc:17:35: note: in definition of macro 'forn'
   17 | #define forn(i,a,b) for(int i=a;  i<b; i++)
      |                                   ^
Language: C++

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



int main()
{
    int H,W;
    cin>>H>>W;
    int** dp=new int*[H];
    int** mat=new int*[H];

    for(int i=0;i<H;i++)
    {
        mat[i]=new int[W];
        dp[i]=new int[W];
        char ch;
        for(int j=0;j<W;j++)
        {
            cin>>ch;
            if(ch=='.')
            {
                mat[i][j]=0;
                dp[i][j]=0;
            }
            else
            {
                mat[i][j]=1;
                dp[i][j]=0;
            }
        }
    }
    dp[0][0]=1
    for(int i=0;i<H;i++)
    {
        for(int j=0;j<W;j++)
        {
            if(mat[i][j]==0)
            {
                int ans=0;
                if(i>0)
                    ans=max(dp[i-1][j],ans);
                if(j>0)
                    ans=max(dp[i][j-1],ans);
                dp[i][j]=1+ans;
            }
        }
    }
    cout<<dp[H-1][W-1];
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:15: error: expected ';' before 'for'
   34 |     dp[0][0]=1
      |               ^
      |               ;
   35 |     for(int i=0;i<H;i++)
      |     ~~~        
a.cc:35:17: error: 'i' was not declared in this scope
   35 |     for(int i=0;i<H;i++)
      |                 ^
Language: C++

n , m = map(int , input().split())
dp = []
for i in range(n + 1):
    dp.append([])
    for j in range(m + 1):
        dp[i].append(0)
arr = []
for i in range(n):
    arr.append(input())
dp[1][1] = 1
for i in range(1,n + 1):
    for j in range(1,m + 1):
        if arr[i - 1][j - 1] == '#' or (i == 1 and j == 1):
            continue
        dp[i][j] = dp[i - 1][j] + dp[i][j - 1]
print(dp[n][m] % 1000000007)


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

#include <bits/stdc++.h>
using namespace std;
//SET PRECIOSION   cout << fixed ;  cout << setprecision(n) << ans << endl;
#define ll long long
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
ll x,y,z,a,b,c,sum,ans,total,t,cnt,n,m,k,p,kase;
string inp[1011];
ll dp[1011][1011];

ll findAns(ll i, ll j)
{
     if(i==n-1 && j== m-1)
        return 1;
    if(i>=n|| j>=m)
        return 0;
    if(i<0|| j<0)
        return 0;
    if(inp[i][j]=='#')
        return 0;
    if(dp[i][j]!=-1)
        return dp[i][j];
    ll ans1 = 0, ans2 = 0,ans3=0, ans4 = 0;
    ans2 = findAns(i+1,j);
    ans3 = findAns(i, j+1);
    return dp[i][j]= (ans1+ans2+ans3+ans4)%(1000000007);

}
int main()
{
	FAST;
	cin>>n>>m;
	for(ll i=0; i<n; i++)
        cin>>inp[i];
    memset(dp,-1,sizeof(dp));
    memset(vis,false,sizeof(vis));
    cout<<findAns(0,0)<<endl;
	//clear vectors and maps you idiot
	// check array size dumb
	// use long long instead of int too
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:12: error: 'vis' was not declared in this scope
   37 |     memset(vis,false,sizeof(vis));
      |            ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
//SET PRECIOSION   cout << fixed ;  cout << setprecision(n) << ans << endl;
#define ll long long
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
ll x,y,z,a,b,c,sum,ans,total,t,cnt,n,m,k,p,kase;
string inp[1011];
ll dp[1011][1011];
bool vis[1011][1011];
ll findAns(ll i, ll j)
{
     if(i==n-1 && j== m-1)
        return 1;
    if(i>=n|| j>=m)
        return 0;
    if(i<0|| j<0)
        return 0;
    if(inp[i][j]=='#')
        return 0;
    if(dp[i][j]!=-1)
        return dp[i][j];
    ll ans1 = 0, ans2 = 0,ans3=0, ans4 = 0;
    ans2 = findAns(i+1,j);
    ans3 = findAns(i, j+1);
    return dp[i][j]= ans1+ans2+ans3+ans4;

}
int main()
{
	FAST;`1
	cin>>n>>m;
	for(ll i=0; i<n; i++)
        cin>>inp[i];
    memset(dp,-1,sizeof(dp));
    memset(vis,false,sizeof(vis));
    cout<<findAns(0,0)%(1000000007)<<endl;
	//clear vectors and maps you idiot
	// check array size dumb
	// use long long instead of int too
	return 0;
}


Compiler output:
a.cc:32:14: error: stray '`' in program
   32 |         FAST;`1
      |              ^
a.cc: In function 'int main()':
a.cc:32:16: error: expected ';' before 'cin'
   32 |         FAST;`1
      |                ^
      |                ;
   33 |         cin>>n>>m;
      |         ~~~
Language: C

#include <cstdio>
#include <vector>
#include <cstring>

unsigned long long mod = 1000000007;
unsigned long long dp[1005][1005];
char matrix[1005][1005];
int h;
int w;

unsigned long long countPaths(int row, int col) {
    //std :: cerr << row << ' ' << col << '\n';
    if(row == h || col == w) return 0;
    if(matrix[row][col] == '#') return 0;
    if(row == h - 1 && col == w - 1) return 1;
    if(dp[row][col]) return dp[row][col] % mod;

    if(!dp[row][col])
        dp[row][col] = (countPaths(row + 1, col) + countPaths(row, col + 1)) % mod;

    //std :: cerr << row << ' ' << col << '\n';
    return dp[row][col] % mod;
}

int main() {
    scanf("%d", &h);
    scanf("%d", &w);

    memset(dp, 0, 1005);

    for(int i = 0 ; i < h ; i++) {
        scanf("%s", matrix[i]);
    }

    auto ret = countPaths(0 , 0);

    printf("%d", ret);
}

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

#include<bits/stdc++.h>
using namespace std;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<pi> vpi;
typedef vector<vi> vii;
typedef map<int, int> mp;
typedef set<int> set;
typedef multiset<int> mset;
typedef long int int32;
typedef unsigned long int uint32;
typedef long long int int64;
typedef unsigned long long int  uint64;
typedef vector<int64> vi64;
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define form(i,j,k,l) for(int i=j;i<int(k);i+=l)
#define rform(i,j,k,l) for(int i=int(j);i>int(l);i-=l)
#define rep(i, j) for(int i=0;i<int(j);i++)
#define rrep(i, j) for(int i=int(j);i>=0;i--)
#define all(cont) cont.begin(), cont.end()
#define rall(cont) cont.end(), cont.begin()
#define forc(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define IN(A, B, C) assert( B <= A && A <= C)
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define INF (int)1e9
#define INF64 (int64)1e18
#define EPS 1e-9
#define PI 3.1415926535897932384626433832795
#define MOD 1000000009
#define read(type) readInt<type>()
#define F first
#define S  second
const double pie = acos(-1.0);
template <typename T>
T Max(T x, T y)
{
	return (x > y) ? x : y;
}
template <typename T>
T Min(T x, T y)
{
	return (x > y) ? y : x;
}


int gcd(int n1, int n2)
{
	if (n2 != 0) return gcd(n2, n1 % n2);
	else return n1;
}
const int mod = 1e9 + 7;
int main()
{	fast;

	int n, m;
	cin >> n >> m;
	string  arr[n];
	for (int i = 0; i < n; i++)
		cin >> arr[i];
	int dp[n][m];
	dp[0][0] = 1;
	int ret = 0;
	for (int i = 0; i < n; i++)
	{	dp[i][0] = 1;
		if (arr[i][0] == '#')
		{
			ret = 1;
		}
		if (ret == 1)
			dp[i][0] = 0;
	}
	ret = 0;
	for (int i = 0; i < m; i++)
	{	dp[0][i] = 1;
		if (arr[0][i] == '#')
			ret = 1;
		if (ret == 1)
			dp[0][i] = 0;
	}
	for (int i = 1; i < n; i++)
	{	for (int j = 1; j < m; j++)
		{	if (arr[i][j] == '#')
				dp[i][j] = 0;
			else
			{	dp[i][j] = (dp[i - 1][j] % mod + dp[i][j - 1] % mod) % mod;

			}
		}
	}
	for (int i = 0; i < n; i++)
		for (int j = 0; j < m; j++)
			trace(dp[i][j], i, j);
	cout << dp[n - 1][m - 1];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:94:25: error: 'trace' was not declared in this scope
   94 |                         trace(dp[i][j], i, j);
      |                         ^~~~~
Language: C++

#include <bits/stdc++.h>
#define mod 1000000007
#define ll long long 
#define f(j) for(ll i=0;i<j;i++)
#define pb(i) push_back(i)
#define faster ios_base::sync_with_stdio(false); cin.tie(NULL);
using namespace std;    
typedef vector<vector<long long> > matrix; 
ll ans[1000][1000];
int main(){
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
	// faster
	ans[0][0]=1;
	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=0;i<h;i++)
		for(int j=0;j<w;j++){
			if(a[i][j]=='#')	continue;
			if(j>0)	ans[i][j]=ans[i][j-1];
			if(i>0)	ans[i][j]+=ans[i-1][j];
			ans[i][j]%=m;
		}
	cout<<ans[h-1][w-1]<<"\n";
return 0;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:36: error: 'm' was not declared in this scope
   28 |                         ans[i][j]%=m;
      |                                    ^
Language: C++

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

#define mod      1e9+7;
#define INF      1e9+9;
#define ps(x,y)  fixed<<setprecision(y)<<x
# define PI 3.14159265358979323846264338327950 L
typedef long long ll;
typedef unsigned long long ull;
int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
#ifndef ONLINE_JUDGE
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
#endif
	int n,m;
	cin>>n>>m;
	char ch[n][m];
	for(int i=0;i<n;i++){
		for(int j=0;j<m;j++){
			cin>>ch[i][j];
		}
	}
	int dp[n][m]; dp[0][0]=1;
	for(int i=0;i<n;i++){
		for(int j=0;j<m;j++){
			if(ch[i][j]=='#') dp[i][j]=0;
			else if(i==0 && j==0) dp[i][j]=1;
			else if(i==0)  dp[i][j]=dp[i][j-1];
			else if(j==0)  dp[i][j]=dp[i-1][j];
			else{
				dp[i][j]=dp[i-1][j]+dp[i][j-1];
				if(dp[i][j]>=mod)
					dp[i][j]-=mod;
			}
		}
	}
	for(int i=0;i<n;i++){
		for(int j=0;j<m;j++){
			cout<<dp[i][j]<<' ';
		}
		cout<<endl;
	}
	cout<<dp[n-1][m-1]<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:49: error: expected primary-expression before ')' token
   36 |                                 if(dp[i][j]>=mod)
      |                                                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
vector<int>v[100005];
char ch[10005][10005];long long int kk[10005][10005],flag,p=1000000007;
long long int dp[900000005],vis[900000005];
long long int dfs(long long int x)
{
  //cout<<x<<endl;
  if(vis[x]==1)
  return dp[x];
  vis[x]=1;
  if(x==flag){
    dp[x]=1;
  //cout<<1<<endl;
  return 1;
  }
  long long int j=0;
  for(auto i : v[x])
  {
    j+=(dfs(i)%p);
  }
  dp[x]=j%p;
  return j%p;
}
int main()
{
  long long int i,j,n,a,b,m;
  cin>>n>>m;
  flag=(n)*(m);
  flag--;
  for(i=0;i<n;i++)
  {
    for(j=0;j<m;j++)
    cin>>ch[i][j];
  }
 long long int k=0;
   for(i=0;i<n;i++)
  {
    for(j=0;j<m;j++)
    {
      kk[i][j]=k;
      k++;
    }
  }
 
  for(i=0;i<n;i++)
  {
    for(j=0;j<m;j++)
    {
      if(ch[i][j]=='.')
      {
        if(j<m-1)
        {
          if(ch[i][j]=='.'&&ch[i][j+1]=='.')
          v[kk[i][j]].push_back(kk[i][j+1]);
          //cout<<i<<" "<<j<<"  "<<i<<" "<<j+1<<" "<<kk[i][j]<<endl;}  
        }
        if(i<n-1)
        {
          if(ch[i][j]=='.'&&ch[i+1][j]=='.')
          v[kk[i][j]].push_back(kk[i+1][j]);  
          //cout<<i<<" "<<j<<"  "<<i+1<<" "<<j<<" "<<kk[i][j]<<endl;}
        }
      }
    }
  }
  cout<<(dfs(0)%p);
}


Compiler output:
/tmp/ccizDNkt.o: in function `dfs(long long)':
a.cc:(.text+0x1b): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccizDNkt.o
a.cc:(.text+0x54): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccizDNkt.o
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
vector<long long int>v[100000005];
char ch[10005][10005];long long int kk[10005][10005],flag,p=1000000007;
long long int dp[900000005],vis[900000005];
long long int dfs(long long int x)
{
  //cout<<x<<endl;
  if(x==flag)
  return 1;
  if(vis[x]==1)
  return dp[x];
  vis[x]=1;
  long long int j=0;
  for(auto i : v[x])
  {
    j+=(dfs(i)%p);
  }
  dp[x]=j%p;
  return j%p;
}
int main()
{
  long long int i,j,n,a,b,m;
  cin>>n>>m;
  flag=(n)*(m);
  flag--;
  for(i=0;i<n;i++)
  {
    for(j=0;j<m;j++)
    cin>>ch[i][j];
  }
 long long int k=0;
   for(i=0;i<n;i++)
  {
    for(j=0;j<m;j++)
    {
      kk[i][j]=k;
      k++;
    }
  }
 
  for(i=0;i<n;i++)
  {
    for(j=0;j<m;j++)
    {
      if(ch[i][j]=='.')
      {
        if(j<m-1)
        {
          if(ch[i][j]=='.'&&ch[i][j+1]=='.')
          v[kk[i][j]].push_back(kk[i][j+1]);
          //cout<<i<<" "<<j<<"  "<<i<<" "<<j+1<<" "<<kk[i][j]<<endl;}  
        }
        if(i<n-1)
        {
          if(ch[i][j]=='.'&&ch[i+1][j]=='.')
          v[kk[i][j]].push_back(kk[i+1][j]);  
          //cout<<i<<" "<<j<<"  "<<i+1<<" "<<j<<" "<<kk[i][j]<<endl;}
        }
      }
    }
  }
  cout<<(dfs(0)%p);
}


Compiler output:
/tmp/ccnVYVyo.o: in function `dfs(long long)':
a.cc:(.text+0xf): relocation truncated to fit: R_X86_64_PC32 against symbol `flag' defined in .bss section in /tmp/ccnVYVyo.o
a.cc:(.text+0x32): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccnVYVyo.o
a.cc:(.text+0x4f): relocation truncated to fit: R_X86_64_PC32 against symbol `dp' defined in .bss section in /tmp/ccnVYVyo.o
a.cc:(.text+0x6b): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccnVYVyo.o
a.cc:(.text+0x13a): relocation truncated to fit: R_X86_64_PC32 against symbol `dp' defined in .bss section in /tmp/ccnVYVyo.o
/tmp/ccnVYVyo.o: in function `main':
a.cc:(.text+0x199): relocation truncated to fit: R_X86_64_PC32 against symbol `flag' defined in .bss section in /tmp/ccnVYVyo.o
a.cc:(.text+0x1a0): relocation truncated to fit: R_X86_64_PC32 against symbol `flag' defined in .bss section in /tmp/ccnVYVyo.o
a.cc:(.text+0x1ab): relocation truncated to fit: R_X86_64_PC32 against symbol `flag' defined in .bss section in /tmp/ccnVYVyo.o
a.cc:(.text+0x1d8): relocation truncated to fit: R_X86_64_PC32 against symbol `ch' defined in .bss section in /tmp/ccnVYVyo.o
a.cc:(.text+0x248): relocation truncated to fit: R_X86_64_PC32 against symbol `kk' defined in .bss section in /tmp/ccnVYVyo.o
a.cc:(.text+0x2a6): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h> 
#include <iostream>
#include<set>
#include<utility>
using namespace std;
#include<algorithm>
#define ll  long long 
#define MOD 1000000007
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

const int N = 1010;
const ll MOD = 1e9 + 7;
char a[N][N];
int h, w;
ll dp[N][N];

int main() {
	ios_base::sync_with_stdio(false);

	cin >> h >> w;
	for (int i = 1; i <= h; i++) {
		for (int j = 1; j <= w; j++) {
			cin >> a[i][j];
		}
	}
	for (int i = 1; i <= h; i++) {
		for (int j = 1; j <= w; j++) {
			if (i == 1 && j == 1)
				dp[i][j] = 1;
			else {
				if (i - 1 > 0 && a[i - 1][j] == '.')
					dp[i][j] = (dp[i][j] + dp[i - 1][j]) % MOD;
				if (j - 1 > 0 && a[i][j - 1] == '.')
					dp[i][j] = (dp[i][j] + dp[i][j - 1]) % MOD;
			}
		}
	}
	cout << dp[h][w];

	return 0;
}


Compiler output:
a.cc:8:13: error: expected unqualified-id before numeric constant
    8 | #define MOD 1000000007
      |             ^~~~~~~~~~
a.cc:12:10: note: in expansion of macro 'MOD'
   12 | const ll MOD = 1e9 + 7;
      |          ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int h, w;
  cin >> h >> w;
  vector<vector<bool>> map(h + 2, vector<bool>(w + 2));
  vector<vector<int>> dp(h + 2, vector<int>(h + 2));
  for(int i = 1; i <= h; i++){
    string s;
    cin >> s;
    for(int j = 1; j <= w; j++){
      if(s[j - 1] == '#') map[i][j] = false;
    }
  }
  dp[1][1] = 1;
  for(int i = 1; i <= h; i++){
    for(int j = 1; j <= w; j++){
      if(map[i][j]) dp[i][j] = (dp[i - 1][j] + dp[i][j - 1]) % (1e9 + 7);
    }
  }
  cout << dp[h][w] << "\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:62: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'double' to binary 'operator%'
   18 |       if(map[i][j]) dp[i][j] = (dp[i - 1][j] + dp[i][j - 1]) % (1e9 + 7);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
      |                                              |                      |
      |                                              |                      double
      |                                              __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}
Language: C++

// #include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
#include<map>

using namespace std;
#define mod 1000000007
#define ll long long 


ll dp[1009][1009];
int n, m;

char arr[1009][1009];

ll solve(int i, int j) {
	if(i == n - 1 && j == m - 1)
		return 1;

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

	int ans = 0;
	if(i + 1 < n && arr[i + 1][j] == '.'){
		ans += solve(i + 1, j);
		ans %= mod;
	}
	if(j + 1 < m && arr[i][j + 1] == '.') {
		ans += solve(i, j + 1);
		ans %= mod;
	}
	return dp[i][j] = ans % mod;
}


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

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

  	// memset(dp, -1, sizeof(dp));
  	// cout<<solve(0, 0)<<endl;

}

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

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


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

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'x' was not declared in this scope
   11 |     cin>>x>>y;
      |          ^
a.cc:11:13: error: 'y' was not declared in this scope
   11 |     cin>>x>>y;
      |             ^
Language: Java

import java.util.*;

class Main {
  public static void main(String[] args) {
    int h, w;
    Scanner sc = new Scanner(System.in);
    h = sc.nextInt();
    w = sc.nextInt();
    String[] grid = new String[h];
    long[][] dp = new long[h+1][w+1];
    int ii = 0;
    while(sc.hasNext()) {
      grid[ii++] = sc.nextLine();
    }
    
    for(int i = 0; i < h; i++) {
      for(int j = 0; j < w; j++) {
        if(grid[i].charAt(j) == '.') {
          long val1, val2;
          if(i-1 >= 0)
            val1 = dp[i-1][j];
          if(j-1 >= 0)
            val2 = dp[i][j-1];
          dp[i][j] = val1 + val2;
        }
      }
      
    }
    System.out.println(dp[h-1][w-1]%(10^9 + 7));
 }
}


Compiler output:
Main.java:24: error: variable val1 might not have been initialized
          dp[i][j] = val1 + val2;
                     ^
Main.java:24: error: variable val2 might not have been initialized
          dp[i][j] = val1 + val2;
                            ^
2 errors
Language: Java

import java.util.*;

class Main {
  public static void main(String[] args) {
    int h, w;
    Scanner sc = new Scanner(System.in);
    h = sc.nextInt();
    w = sc.nextInt();
    String[] grid = new String[h];
    long[][] dp = new long[h+1][w+1];
    int ii = 0;
    while(sc.hasNext()) {
      grid[ii++] = sc.nextLine();
    }
    
    for(int i = 0; i < h; i++) {
      for(int j = 0; j < w; j++) {
        if(grid[i].charAt(j) == '.') {
          long val1, val2;
          if(i-1 >= 0)
            val1 = dp[i-1][j];
          if(j-1 >= 0)
            val2 = dp[i][j-1];
          dp[i][j] = val1 + val2;
        }
      }
      System.out.println(dp[h-1][w-1]%(10^9 + 7));
    }
 }

Compiler output:
Main.java:29: error: reached end of file while parsing
 }
  ^
1 error
Language: C++

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

int main()
{
	int n,m;
	cin>>n>>m;
	vector<string>a(n);
	for(int i=0;i<n;i++)
	{
			cin>>a[i]; 
		
	}
/*	for(int i=0;i<n;i++)
	{
		for(int j=0;j<m;j++)
		{
			cout<<a[i][j];//<<" ";
		}
		cout<<endl;
	}
	*/
	vector<vector<int>>dp(n,vector<int>(m));
	dp[0][0]=1;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<m;j++)
		{
			if(a[i][j]=='#') continue;
			if(i==0&&j==0) continue;
			if(i==0) dp[i][j]=dp[i][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])%1000000007;
			}
		}
	}
	cout<<dp[n-1][m-1]%1000000007<<endl;
	


Compiler output:
a.cc: In function 'int main()':
a.cc:39:45: error: expected '}' at end of input
   39 |         cout<<dp[n-1][m-1]%1000000007<<endl;
      |                                             ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int mod=1e9+7;
  int h,w;
int valid(int x,int y)
{
    if((x>=0&&x<h)&&(y>=0&&y<w)) return 1;
    return 0;
}
void add_self(int &x,int &y)
{
    x=(x+y)%mod;
}
int main()
{
  
    cin>>h>>w;
    int grid[h][w];
    long long dp[h][w];
    for(int i=0;i<h;i++)
    {
        for(int j=0;j<w;j++)
        {
            dp[i][j]=0;
            char x;
            cin>>x;
            if(x=='#')
            grid[i][j]=0;
            else  grid[i][j]=1;
        }
    }
    
    dp[0][0]=1;
    for(int i=0;i<h;i++)
    {
        for(int j=0;j<w;j++)
        {
            if(valid(i-1,j)&&grid[i-1][j]!=0) add_self(dp[i][j],dp[i-1][j]);
            if(valid(i,j-1)&&grid[i][j-1]!=0) add_self(dp[i][j],dp[i][j-1]);
        }
    }
    cout<<dp[h-1][w-1]%mod;
    

}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:63: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'long long int'
   38 |             if(valid(i-1,j)&&grid[i-1][j]!=0) add_self(dp[i][j],dp[i-1][j]);
      |                                                        ~~~~~~~^
a.cc:10:20: note:   initializing argument 1 of 'void add_self(int&, int&)'
   10 | void add_self(int &x,int &y)
      |               ~~~~~^
a.cc:39:63: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'long long int'
   39 |             if(valid(i,j-1)&&grid[i][j-1]!=0) add_self(dp[i][j],dp[i][j-1]);
      |                                                        ~~~~~~~^
a.cc:10:20: note:   initializing argument 1 of 'void add_self(int&, int&)'
   10 | void add_self(int &x,int &y)
      |               ~~~~~^
Language: C++

#include<bits/stdc++.h>
using namespace std; 
#define m 1000000007
int main()
{
    long long int h,w;
    cin>>h>>w;
    long long int dp[h][w];
    for(ilong long int i=0;i<h;i++)
    {
          for(long long int j=0;j<w;j++)
        {
          string s;
          cin>>s;
          if(s==".")
          dp[i][j]=1;
          
          if(s=="#")
          dp[i][j]=0;
        }  
    }
     for(long long int i=1;i<w;i++)
    {
       if(dp[0][i-1]==0)
       dp[0][i]=0;
    }
    for(long long int i=1;i<h;i++)
    {
       if(dp[i-1][0]==0)
       dp[i][0]=0;
    }
    for(long long int i=1;i<h;i++)
    {
        for(long long int j=1;j<w;j++)
        {
            if(dp[i][j]!=0)
            {
                dp[i][j]=((dp[i][j-1]%m)+(dp[i-1][j]%m))%m;
            }
        }
    }
    
    cout<<(dp[h-1][w-1])%m;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'ilong' was not declared in this scope; did you mean 'ulong'?
    9 |     for(ilong long int i=0;i<h;i++)
      |         ^~~~~
      |         ulong
a.cc:9:28: error: 'i' was not declared in this scope
    9 |     for(ilong long int i=0;i<h;i++)
      |                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std; 
#define m 1000000007
int main()
{
    long lng int h,w;
    cin>>h>>w;
    long long int dp[h][w];
    for(ilong long int i=0;i<h;i++)
    {
          for(long long int j=0;j<w;j++)
        {
          string s;
          cin>>s;
          if(s==".")
          dp[i][j]=1;
          
          if(s=="#")
          dp[i][j]=0;
        }  
    }
     for(long long int i=1;i<w;i++)
    {
       if(dp[0][i-1]==0)
       dp[0][i]=0;
    }
    for(long long int i=1;i<h;i++)
    {
       if(dp[i-1][0]==0)
       dp[i][0]=0;
    }
    for(long long int i=1;i<h;i++)
    {
        for(long long intj=1;j<w;j++)
        {
            if(dp[i][j]!=0)
            {
                dp[i][j]=((dp[i][j-1]%m)+(dp[i-1][j]%m))%m;
            }
        }
    }
    
    cout<<(dp[h-1][w-1])%m;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: expected initializer before 'int'
    6 |     long lng int h,w;
      |              ^~~
a.cc:7:10: error: 'h' was not declared in this scope
    7 |     cin>>h>>w;
      |          ^
a.cc:7:13: error: 'w' was not declared in this scope
    7 |     cin>>h>>w;
      |             ^
a.cc:9:9: error: 'ilong' was not declared in this scope; did you mean 'ulong'?
    9 |     for(ilong long int i=0;i<h;i++)
      |         ^~~~~
      |         ulong
a.cc:9:28: error: 'i' was not declared in this scope
    9 |     for(ilong long int i=0;i<h;i++)
      |                            ^
a.cc:16:11: error: 'dp' was not declared in this scope; did you mean 'dup'?
   16 |           dp[i][j]=1;
      |           ^~
      |           dup
a.cc:19:11: error: 'dp' was not declared in this scope; did you mean 'dup'?
   19 |           dp[i][j]=0;
      |           ^~
      |           dup
a.cc:24:11: error: 'dp' was not declared in this scope; did you mean 'dup'?
   24 |        if(dp[0][i-1]==0)
      |           ^~
      |           dup
a.cc:29:11: error: 'dp' was not declared in this scope; did you mean 'dup'?
   29 |        if(dp[i-1][0]==0)
      |           ^~
      |           dup
a.cc:34:30: error: 'j' was not declared in this scope
   34 |         for(long long intj=1;j<w;j++)
      |                              ^
a.cc:36:16: error: 'dp' was not declared in this scope; did you mean 'dup'?
   36 |             if(dp[i][j]!=0)
      |                ^~
      |                dup
a.cc:43:12: error: 'dp' was not declared in this scope; did you mean 'dup'?
   43 |     cout<<(dp[h-1][w-1])%m;
      |            ^~
      |            dup
Language: C++

#include<bits/stdc++.h>
using namespace std; 
int main()
{
    int h,w;
    cin>>h>>w;
    dp[h][w];
    for(int i=0;i<h;i++)
    {
      for(int j=0;j<w;j++)
    {
      sting s;
      cin>>s;
      if(s==".")
      dp[i][j]=1;
      else
      dp[i][j]=0;
    }  
    }
     for(int i=0;i<h;i++)
    {
          for(int j=0;j<w;j++)
        {
           if(i==0 && dp[i][j-1]==0)
           {
               dp[i][j]==0;
           }
           if(j==0 && dp[i-1][j]==0)
           {
               dp[i][j]=0;
           }
           if(i>0 && j>0 && dp[i][j]!=0)
           dp[i][j]=dp[i][j-1]+dp[i-1][j];
           
        }  
    }
    cout<<dp[h-1][w-1];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'dp' was not declared in this scope; did you mean 'dup'?
    7 |     dp[h][w];
      |     ^~
      |     dup
a.cc:12:7: error: 'sting' was not declared in this scope
   12 |       sting s;
      |       ^~~~~
a.cc:13:12: error: 's' was not declared in this scope
   13 |       cin>>s;
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;

char in[1100][1100];
long long dp[1100][1100];

int main() {
	ios::sync_with_stdio(0);
    cin.tie(0);
    int h, w;
    cin >> h >> w;

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

    dp[0][0] = 0;

    for (int i = 0; i < h; i++) {
    	for (int j = 0; j < n; j++) {
    		if (in[i][j] == '#') {
    			continue;
    		}
    		if (i - 1 >= 0) {
    			dp[i][j] = (dp[i - 1][j] + dp[i][j] % MOD);
    		}
    		if (j - 1 >= 0) {
    			dp[i][j] = (dp[i][j - 1] + dp[i][j] % MOD);
    		}
    	}
    }
    cout << dp[h - 1][w - 1] << "\n";
    return 0;
}	

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

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

ll main() {
	ll n,m;
	cin>>n>>m;
	string s[n];
	for(ll i=0;i<n;i++)
	    cin>>s[i];
	ll a[n][m];
	for(ll i=0;i<n;i++)for(ll j=0;j<m;j++)a[i][j]=0;
	a[n-1][m-1]=1;
	ll f1=0,f2=0;
	for(ll i=n-2;i>=0;i--)
	{
	    if(s[i][m-1]=='#')f1=1;
	    if(f1==0)a[i][m-1]=1;
	}
	for(ll i=m-2;i>=0;i--)
	{
	    if(s[n-1][i]=='#')f2=1;
	    if(f2==0)a[n-1][i]=1;
	}
	for(ll i=n-2;i>=0;i--)
	{
	    for(ll j=m-2;j>=0;j--)
	    {
	        if(s[i][j]=='#')a[i][j]=-1;
	        else{
	            if(s[i+1][j]!='#')a[i][j]=a[i+1][j];
	            if(s[i][j+1]!='#'){
	                a[i][j]+=a[i][j+1];
	                a[i][j]%=mod;
	            }
	        } 
	    }
	}
	cout<<a[0][0];
	return 0;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

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

int h[10e5+3],n,ans,k;
long long dp[10e5+3];
int main(){
	cin>>n>>k;
	for (int i=0;i<n;i++){
		cin>>h[i];
	}
    dp[0]=0;
	for (int i=1;i<n;i++){
	   dp[i]=99999999; 
	   for (int j=max(i-k,0);j<i;j++){
	       dp[i]=min(dp[i],dp[j]+abs(h[i]-h[j]));
	   }
	}
	cout<<dp[n-1]<<"\n";
    return 0;
}

Compiler output:
a.cc:4:11: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    4 | int h[10e5+3],n,ans,k;
      |       ~~~~^~
a.cc:4:11: error: could not convert '(1.0e+6 + (double)3)' from 'double' to 'long unsigned int'
    4 | int h[10e5+3],n,ans,k;
      |       ~~~~^~
      |           |
      |           double
a.cc:4:11: error: size of array 'h' has non-integral type 'double'
a.cc:5:18: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    5 | long long dp[10e5+3];
      |              ~~~~^~
a.cc:5:18: error: could not convert '(1.0e+6 + (double)3)' from 'double' to 'long unsigned int'
    5 | long long dp[10e5+3];
      |              ~~~~^~
      |                  |
      |                  double
a.cc:5:18: error: size of array 'dp' has non-integral type 'double'
Language: Java

import java.util.*;
import java.io.*;
public class HGird {
    static int mod  = 1000000007;
    public static void main(String[] args) {
        MyScanner ms = new MyScanner();
        int H = ms.nextInt();
        int W= ms.nextInt();
        char [][] table = new char[H][W];
        int [] [] dp = new int[H][W];
        for(int i=0;i<H;i++)
        {
            String line = ms.nextLine();
            for(int j=0;j<W;j++)
            table[i][j] = line.charAt(j);
        }
        dp[0][0] = 1;
        for(int i=0;i<H;i++)
        for(int j=0;j<W;j++){
            if(table[i][j]=='#') continue;
            if(i-1>=0)dp[i][j] = (dp[i-1][j]+dp[i][j])%mod;
            if(j-1>=0)dp[i][j] = (dp[i][j-1]+dp[i][j])%mod;
        }
    System.out.println(dp[H-1][W-1]);
    }


    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;
   
        public MyScanner() {
           br = new BufferedReader(new InputStreamReader(System.in));
        }
   
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
   
        int nextInt() {
            return Integer.parseInt(next());
        }
   
        long nextLong() {
            return Long.parseLong(next());
        }
   
        double nextDouble() {
            return Double.parseDouble(next());
        }
   
        String nextLine(){
            String str = "";
        try {
           str = br.readLine();
        } catch (IOException e) {
           e.printStackTrace();
        }
        return str;
        }
  
     }
}

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