Language: C++

#include<cstdio>
#include<bitset>
using namespace std;

ll h, w, a[80][80], b[80][80], mid = 6480;
bitset<12960> dp[2][80], temp;
 
int main() {
  scanf("%lld%lld", &h, &w);
  for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) scanf("%lld", &a[i][j]);
  for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) scanf("%lld", &b[i][j]);
  dp[0][0][mid+a[0][0]-b[0][0]] = true;
  dp[0][0][mid-a[0][0]+b[0][0]] = true;
  for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) if (i + j > 0) {
    if (i == 0) temp = dp[i&1][j-1];
    else if (j == 0) temp = dp[!(i&1)][j];
    else temp = dp[!(i&1)][j] | dp[i&1][j-1];
    ll x = abs(a[i][j]-b[i][j]);
    dp[i&1][j] = (temp >> x) | (temp << x);
  }
  for (ll i = 0;; i++) if (dp[!(h&1)][w-1][mid-i] || dp[!(h&1)][w-1][mid+i]) {
    printf("%lld\n", i);
    return 0;
  }
}

Compiler output:
a.cc:5:1: error: 'll' does not name a type
    5 | ll h, w, a[80][80], b[80][80], mid = 6480;
      | ^~
a.cc: In function 'int main()':
a.cc:9:22: error: 'h' was not declared in this scope
    9 |   scanf("%lld%lld", &h, &w);
      |                      ^
a.cc:9:26: error: 'w' was not declared in this scope
    9 |   scanf("%lld%lld", &h, &w);
      |                          ^
a.cc:10:8: error: 'll' was not declared in this scope
   10 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) scanf("%lld", &a[i][j]);
      |        ^~
a.cc:10:18: error: 'i' was not declared in this scope
   10 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) scanf("%lld", &a[i][j]);
      |                  ^
a.cc:10:37: error: expected ';' before 'j'
   10 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) scanf("%lld", &a[i][j]);
      |                                     ^~
      |                                     ;
a.cc:10:45: error: 'j' was not declared in this scope
   10 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) scanf("%lld", &a[i][j]);
      |                                             ^
a.cc:10:72: error: 'a' was not declared in this scope
   10 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) scanf("%lld", &a[i][j]);
      |                                                                        ^
a.cc:11:8: error: 'll' was not declared in this scope
   11 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) scanf("%lld", &b[i][j]);
      |        ^~
a.cc:11:18: error: 'i' was not declared in this scope
   11 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) scanf("%lld", &b[i][j]);
      |                  ^
a.cc:11:37: error: expected ';' before 'j'
   11 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) scanf("%lld", &b[i][j]);
      |                                     ^~
      |                                     ;
a.cc:11:45: error: 'j' was not declared in this scope
   11 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) scanf("%lld", &b[i][j]);
      |                                             ^
a.cc:11:72: error: 'b' was not declared in this scope
   11 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) scanf("%lld", &b[i][j]);
      |                                                                        ^
a.cc:12:12: error: 'mid' was not declared in this scope
   12 |   dp[0][0][mid+a[0][0]-b[0][0]] = true;
      |            ^~~
a.cc:12:16: error: 'a' was not declared in this scope
   12 |   dp[0][0][mid+a[0][0]-b[0][0]] = true;
      |                ^
a.cc:12:24: error: 'b' was not declared in this scope
   12 |   dp[0][0][mid+a[0][0]-b[0][0]] = true;
      |                        ^
a.cc:14:8: error: 'll' was not declared in this scope
   14 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) if (i + j > 0) {
      |        ^~
a.cc:14:18: error: 'i' was not declared in this scope
   14 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) if (i + j > 0) {
      |                  ^
a.cc:14:37: error: expected ';' before 'j'
   14 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) if (i + j > 0) {
      |                                     ^~
      |                                     ;
a.cc:14:45: error: 'j' was not declared in this scope
   14 |   for (ll i = 0; i < h; i++) for (ll j = 0; j < w; j++) if (i + j > 0) {
      |                                             ^
a.cc:18:7: error: expected ';' before 'x'
   18 |     ll x = abs(a[i][j]-b[i][j]);
      |       ^~
      |       ;
a.cc:19:27: error: 'x' was not declared in this scope
   19 |     dp[i&1][j] = (temp >> x) | (temp << x);
      |                           ^
a.cc:21:8: error: 'll' was not declared in this scope
   21 |   for (ll i = 0;; i++) if (dp[!(h&1)][w-1][mid-i] || dp[!(h&1)][w-1][mid+i]) {
      |        ^~
a.cc:21:19: error: 'i' was not declared in this scope
   21 |   for (ll i = 0;; i++) if (dp[!(h&1)][w-1][mid-i] || dp[!(h&1)][w-1][mid+i]) {
      |                   ^