## 1201 - Select Your Ropes

Discussion around the problems of the COJ.
Forum rules
Remember that posting AC code is not allowed here. If you are going to ask a question or to post a solution, describe your algorithm instead. Posting AC code will be penalized.
dovier
Posts: 1143
Joined: 9 years ago
Location: Havana, Cuba
Gender:

### 1201 - Select Your Ropes

Phantom
Posts: 58
Joined: 8 years ago
Location: Cuba
Gender:

### Re: 1201 - Select Your Ropes

Please... Some body can explain me this exercise??... Because I cannot understand it very well yet... I suppose...
I thought the output in this exercise must be:
3
20

I have got only Wrong Answers in this foolish.

Phantom
Posts: 58
Joined: 8 years ago
Location: Cuba
Gender:

### Re: 1201 - Select Your Ropes

I solve this problem… and I think the answer is not the solution to the question…

ymondelo20
Posts: 1968
Joined: 9 years ago
Location: Universidad de las Ciencias Informáticas
Gender:
Contact:

### Re: 1201 - Select Your Ropes

The output sample is ok...

See that for ropes of values 10, 1 and 15 (sample 1)... we can make 7 combinations...

- We use only the rope with value 10... and we can not lift an object with weight more than 10.
- We use only the rope with value 1... and we can not lift an object with weight more than 1.
- We use only the rope with value 15... and we can not lift an object with weight more than 15.

- We use the ropes with values 10 and 1... and we can not lift an object with weight more than 2.
- We use the ropes with values 15 and 1... and we can not lift an object with weight more than 2.
- We use the ropes with values 10 and 15... and we can not lift an object with weight more than 20.

- We use all the ropes... and we can not lift an object with weight more than 3.

The weight of the heaviest object that can be lifted is 20...

Best Regards...
"Every problem has a simple, fast and wrong solution" OJ's Main Law.