Language: C++

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

Compiler output:
a.cc:76:5: error: redefinition of 'int main()'
   76 | int main()
      |     ^~~~
a.cc:12:5: note: 'int main()' previously defined here
   12 | int main()
      |     ^~~~
a.cc: In function 'int main()':
a.cc:83:48: error: 'm' was not declared in this scope
   83 |     vector<vector<char>> A(n + 1, vector<char>(m + 1, '*'));
      |                                                ^