Knapsack problem/0-1: Difference between revisions
→{{header|C#}}
Line 1,197:
Mass MAX Chifer
5 78 00111</pre>
{{out}}
<pre>int n = 20;
int Inside = 400;
int all=Convert.ToInt32(Math.Pow(2,(n+1)));
int[] mass = {9,13,153,50,15,68,27,39,23,52,11,32,24,48,73,42,43,22,7,4,30};
int[] cost = {150,35,200,160,60,45,60,40,30,10,70,30,15,10,40,70,75,80,20,50,10};
396 1030 11111010001000011111
jdoodle.com/ia/rSn</pre>
=={{header|C++}}==
|