copypaste3.cpp: In function 'int main()':
copypaste3.cpp:53:4: error: 'g' was not declared in this scope
53 | g[i][j] = inf;
| ^
copypaste3.cpp:59:5: error: redeclaration of 'long long int ans'
59 | ll ans = inf;
| ^~~
copypaste3.cpp:33:5: note: 'long long int ans' previously declared here
33 | ll ans = 3* A;
| ^~~
copypaste3.cpp:68:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
68 | if (dp[i][j][k] == inf) continue;
| ~~~~~~~~~~~~^~~~~~
copypaste3.cpp:69:34: error: no match for call to '(main()::<lambda(int, int, int, int, long long int)>) (int&, int, int, long long int*)'
69 | to(i, j+1, 0, dp[i][j][k] + A);
| ^
copypaste3.cpp:61:12: note: candidate: 'main()::<lambda(int, int, int, int, long long int)>'
61 | auto to = [&] (int i, int j, int k,int l, ll v) {
| ^
copypaste3.cpp:61:12: note: candidate expects 5 arguments, 4 provided
copypaste3.cpp:71:68: error: no match for call to '(main()::<lambda(int, int, int, int, long long int)>) (int&, int, long long int*)'
71 | to(i, nxt[k][j-k] + k, dp[i][j][k] + C + A * (nxt[k][j-k] - j));
| ^
copypaste3.cpp:61:12: note: candidate: 'main()::<lambda(int, int, int, int, long long int)>'
61 | auto to = [&] (int i, int j, int k,int l, ll v) {
| ^
copypaste3.cpp:61:12: note: candidate expects 5 arguments, 3 provided
copypaste3.cpp:73:5: error: 'g' was not declared in this scope
73 | g[i][j] = min(g[i][j], dp[i][j][k]);
| ^