10373 - The Brick Stops Here

All about problems in Volume 103. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
trulo17
Learning poster
Posts: 62
Joined: Mon Jan 24, 2005 6:12 am
Location: Lima,Peru

10373 - The Brick Stops Here

Post by trulo17 »

could anybody share any ideas to solve this problem? i can't get it within time limit :(
Fixxxer
New poster
Posts: 5
Joined: Tue Aug 30, 2005 6:20 pm

Post 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
Post Reply

Return to “Volume 103 (10300-10399)”