0_0_38572165_25345.cpp: In function 'int main()':
0_0_38572165_25345.cpp:7:5: error: 'scanf' was not declared in this scope
scanf("%d",&C);
^~~~~
0_0_38572165_25345.cpp:16:9: error: 'memset' was not declared in this scope
memset(dp,0,sizeof(dp));
^~~~~~
0_0_38572165_25345.cpp:16:9: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
0_0_38572165_25345.cpp:1:1:
+#include <cstring>
int weight[110],value[110],cnt[110];
0_0_38572165_25345.cpp:16:9:
memset(dp,0,sizeof(dp));
^~~~~~
0_0_38572165_25345.cpp:22:27: error: 'max' was not declared in this scope
dp[k]=max(dp[k],dp[k-value[i]]+weight[i]);
^~~
0_0_38572165_25345.cpp:22:27: note: suggested alternative: 'main'
dp[k]=max(dp[k],dp[k-value[i]]+weight[i]);
^~~
main
0_0_38572165_25345.cpp:25:9: error: 'printf' was not declared in this scope
printf("%d\n",dp[m]);
^~~~~~
0_0_38572165_25345.cpp:25:9: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
0_0_38572165_25345.cpp:1:1:
+#include <cstdio>
int weight[110],value[110],cnt[110];
0_0_38572165_25345.cpp:25:9:
printf("%d\n",dp[m]);
^~~~~~
|