maja.cpp: In function 'void dp_step()':
maja.cpp:23:18: error: 'di' was not declared in this scope
int i1 = i + di[d], j1 = j + dj[d];
^~
maja.cpp:23:18: note: suggested alternative: 'd'
int i1 = i + di[d], j1 = j + dj[d];
^~
d
maja.cpp:24:46: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if (i1 >= 0 && i1 < N && j1 >= 0 && j1 < M) {
^
maja.cpp:25:43: error: invalid conversion from 'double (*)(double) throw ()' to 'std::vector<long long int>::size_type {aka long unsigned int}' [-fpermissive]
nxt[i][j] = max(nxt[i][j], cur[i1][j1] + C[i][j]);
^
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from maja.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:795:7: note: initializing argument 1 of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = long long int; _Alloc = std::allocator<long long int>; std::vector<_Tp, _Alloc>::reference = long long int&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
operator[](size_type __n) _GLIBCXX_NOEXCEPT
^~~~~~~~
maja.cpp: In function 'void simulate()':
maja.cpp:38:18: error: 'di' was not declared in this scope
int i1 = i + di[d], j1 = j + dj[d];
^~
maja.cpp:38:18: note: suggested alternative: 'd'
int i1 = i + di[d], j1 = j + dj[d];
^~
d
maja.cpp:39:46: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if (i1 >= 0 && i1 < N && j1 >= 0 && j1 < M) {
^
maja.cpp:40:33: error: invalid types 'll [100] {aka long long int [100]}[double(double) throw ()]' for array subscript
gains = max(gains, C[i1][j1] + C[i][j]);
^