946 - A Pile of Boxes

All about problems in Volume 9. 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
RC's
Learning poster
Posts: 65
Joined: Fri Jul 13, 2007 3:17 pm

946 - A Pile of Boxes

Post by RC's » Wed Jul 18, 2007 11:23 am

I'm still confused with the example output. How it produced 29 ?
What is the order of the box to be dropped ?

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Re: 946 - A Pile of Boxes

Post by Jan » Wed Jul 18, 2007 2:48 pm

RC's wrote:I'm still confused with the example output. How it produced 29 ?
What is the order of the box to be dropped ?
Read the description again. The boxes will be dropped by input sequence. For the sample case check picture 4 carefully.

First you have 10.

Then you have 4, which can be intersed into 10 completely.

Then you have 6, which can be intersed into 10 completely. Because 4+6 = 10.

Then you have 3, which can be intersed into 6 as well as 4.

...

Hope these help. For any other confusion read the rules again.
Ami ekhono shopno dekhi...
HomePage

Post Reply

Return to “Volume 9 (900-999)”