1 / 6
Oct 2008

Can anyone give me some special test cases? I still get WA. Thanks a lot!!!

  • created

    Oct '08
  • last reply

    Aug '15
  • 5

    replies

  • 299

    views

  • 5

    users

  • 1

    link

It's a fairly easy knapsack problem; I'm not sure what kind of error you could be making. Instead, why don't you post your code? Someone will be able to help you then.

11 days later

Thanks for replying me. I had some stupid mistakes, I fixed it, and I got accepted already. Thanks

7 months later

He only need to buy A one time in total, then he can buy both B & C.

6 years later

Question:
Assume that the value of the main product is zero.
But it has attachments which if added, will drastically increase the value of the bundle together.
In this case should we include the main product or not ?

As in:

1
1000 5
800 0 0
400 5 1
300 5 1
400 3 0
500 2 0

Here value of the main product (1st product) is zero. Should we include the attachments or not ? As the main product's value is itself is zero. Thanks