0_0_24110867_1597.cpp: In function 'int main()': 0_0_24110867_1597.cpp:23:24: error: 'k' was not declared in this scope dp[j]=min(dp[j],dp[k-w[i]]+p[i]); ^