Page 1 of 1

10373 - The Brick Stops Here

Posted: Sat Feb 04, 2006 4:22 am
by trulo17
could anybody share any ideas to solve this problem? i can't get it within time limit :(

Posted: Mon Feb 06, 2006 7:54 pm
by Fixxxer
This can be solved using 0/1 knapsack

use a table Tab[C][B] where
B is no of bricks and
C is total copper content (not concentration) in B bricks

Tab[C][B] contains minimum price of purchasing B bricks where total copper content in B bricks is C

MAX_B=20
MAX_C=1000*20

hope this helps