0_0_36571717_13289.cpp: In function 'int main()': 0_0_36571717_13289.cpp:185:27: error: 'j' was not declared in this scope dp[i][j] = max(dp[i][j], a[k][x - 1] + dp[i - base[k - 1]][k]); ^