0_0_17894491_24160.cpp: In function 'int main()': 0_0_17894491_24160.cpp:42:53: error: 'x' was not declared in this scope dp[i][j]=max(dp[i][j],max(dp[i-1][j-x*w[i]]+a[i]*x+b[i],dp[i-1][j])); ^