homecoming.cpp: In function 'long long int solve(int, int, int*, int*)':
homecoming.cpp:25:22: error: 'nxtcost' was not declared in this scope; did you mean 'cost'?
25 | if(i + k - 1 < n) nxtcost = b[i + k - 1];
| ^~~~~~~
| cost
homecoming.cpp:26:21: error: 'nxtcost' was not declared in this scope; did you mean 'cost'?
26 | else if(it == 2) nxtcost = b[i + k - 1 - n];
| ^~~~~~~
| cost
homecoming.cpp:27:9: error: 'nxtcost' was not declared in this scope; did you mean 'cost'?
27 | else nxtcost = 0;
| ^~~~~~~
| cost
homecoming.cpp:29:27: error: 'nxtcost' was not declared in this scope; did you mean 'cost'?
29 | cur = max(a[i] + cur - nxtcost, a[i] - (cost + nxtcost) + mx);
| ^~~~~~~
| cost