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