Language: C++

#include <stdio.h>

#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;

void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }

template <typename T, typename V>
void __print(const pair<T, V> &x) {
    cerr << '{';
    __print(x.first);
    cerr << ',';
    __print(x.second);
    cerr << '}';
}
template <typename T>
void __print(const T &x) {
    int f = 0;
    cerr << '{';
    for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
    cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
    __print(t);
    if (sizeof...(v)) cerr << ", ";
    _print(v...);
}
#ifdef LOCAL
#define debug(x...)               \
    cerr << "[" << #x << "] = ["; \
    _print(x)
#else
#define debug(x...)
#endif

#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end());
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)

typedef long long ll;

queue<pair<int, int>> q;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll H, W;
    cin >> H >> W;
    vector<vector<char>> s(H, vector<char>(H));
    REP(i, H) {
        REP(j, W) { cin >> s[i][j]; }
    }

    vector<vector<ll>> dp(H, vector<ll>(H));

    bool before_black = false;
    REP(i, H) {
        if (dp[i][0] == '.') {
            if (i == 0) {
                dp[0][0] = 0;
            } else {
                dp[i][0] = dp[i - 1][0];
            }
            before_black = false;
        } else {  // '#'
            if (i == 0) {
                dp[0][0] = 1;
            } else {
                dp[i][0] = dp[i - 1][0] + abs(1 - before_black);
            }
            before_black = true;
        }
    }

    before_black = false;
    REP(i, W) {
        if (dp[0][i] == '.') {
            if (i == 0) {
                dp[0][0] = 0;
            } else {
                dp[0][i] = dp[0][i - 1];
            }
            before_black = false;
        } else {  // '#'
            if (i == 0) {
                dp[0][0] = 1;
            } else {
                dp[0][i] = dp[0][i - 1] + abs(1 - before_black);
            }
            before_black = true;
        }
    }

    //-----------
    FOR(i, 1, W) {
        FOR(i, 1, H) { 
            dp[i][j]=; 
        }
    }

    debug(dp);

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

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:122:19: error: 'j' was not declared in this scope
  122 |             dp[i][j]=;
      |                   ^
a.cc:122:22: error: expected primary-expression before ';' token
  122 |             dp[i][j]=;
      |                      ^