11691 - Allergy Test

All about problems in Volume CXVI. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

11691 - Allergy Test

Postby liauys » Wed Jan 06, 2010 3:29 pm

Hi everyone. Please help me. I tried to used a dp recurrence with complexity 7 * n * 2^n to solve this problem, but it is obviously too slow for n=20. Any hints on this? Really look forward for some enlightenments!! Thanks. :)
liauys
New poster
 
Posts: 7
Joined: Thu Jul 02, 2009 6:37 pm

Re: 11691 - Allergy Test

Postby RodrigoBurgos » Wed Jul 25, 2012 8:33 pm

Hi liauys I see this post to try to find some help, because a get the same idea than you, after think some time, I find the answer to solve this problem, look, your dinamic is with a bit mask ( 2^n * maxSizeDaysOfTheTest ), well if you don't save it in a bit mask, you only save how many Allergy Test exist of size 1, size 2, size 3, size 4... size 7, your states in your dinamic programming will be less than a bit mask.
RodrigoBurgos
New poster
 
Posts: 1
Joined: Wed Jul 25, 2012 8:22 pm


Return to Volume CXVI

Who is online

Users browsing this forum: No registered users and 1 guest