Given an array of Values, Weight, INFINITE capacities of each item, tell the amount of profit we can make. The number of items picked HAS to be a fibonacci number.
Eg.
Num of Items 2
Capacity 200
Wt 100 50
Values 70, 51
ans=(70 * 2)+(50*1);
# | User | Rating |
---|---|---|
1 | jiangly | 3640 |
2 | Benq | 3593 |
3 | tourist | 3572 |
4 | orzdevinwang | 3561 |
5 | cnnfls_csy | 3539 |
6 | ecnerwala | 3534 |
7 | Radewoosh | 3532 |
8 | gyh20 | 3447 |
9 | Rebelz | 3409 |
10 | Geothermal | 3408 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 173 |
2 | adamant | 164 |
3 | awoo | 161 |
4 | TheScrasse | 160 |
5 | nor | 159 |
6 | maroonrk | 156 |
7 | SecondThread | 152 |
8 | pajenegod | 146 |
9 | BledDest | 144 |
10 | Um_nik | 143 |
Q) unbounded knapsack with condition that number of items taken be has to be a fibonacci number
Given an array of Values, Weight, INFINITE capacities of each item, tell the amount of profit we can make. The number of items picked HAS to be a fibonacci number.
Eg.
Num of Items 2
Capacity 200
Wt 100 50
Values 70, 51
ans=(70 * 2)+(50*1);
Rev. | Lang. | By | When | Δ | Comment | |
---|---|---|---|---|---|---|
en5 | vib_1 | 2020-05-12 13:37:17 | 92 | Tiny change: 'tity of an item is a' -> 'tity of any item is a' (published) | ||
en4 | vib_1 | 2020-05-12 13:14:53 | 411 | (saved to drafts) | ||
en3 | vib_1 | 2018-08-15 07:12:35 | 107 | |||
en2 | vib_1 | 2018-08-14 20:58:40 | 39 | Tiny change: 'Given an a' -> 'How to solve the following question\n\nGiven an a' | ||
en1 | vib_1 | 2018-08-14 20:58:03 | 358 | Initial revision (published) |
Name |
---|