To make it simple, you can also think it this way.

The minimum added perimeter for cutting a piece is the weight. (must be 
integers)
The maximum added perimeter for cutting a piece is the value. (can be floats)

min(sum of all weight, P - existing perimeter) is the maximum weight you can 
carry.

Find out the maximum value you can carry with standard knapsack, say V
The answer is simply min(P, V + existing perimeter)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/0c6ca684-934d-4db0-97fa-ebb2c1b43c14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to