http://stackoverflow.com/questions/14686745/guards-and-demand/14687760#14687760

On Sun, May 5, 2013 at 9:44 AM, rohit jangid <rohit.nsi...@gmail.com> wrote:

> a very standard dp problem . try to formulate recurrence relation . it has
> been mentioned a couple of times on stackoverflow as well .
> On May 5, 2013 8:28 AM, "sreekanth guru" <sreekanth.i...@gmail.com> wrote:
>
>> There n stages of a game. At each stage i you will come across a devil.
>> Each devil has its own energy E(i) and price P(i). If you have energy X
>> which is greater than the devils energy at that stage you can win over the
>> devil without any energy loss or You just pay the price to devil then it
>> will give its energy to you and you can go to next stage.   In second case
>> devils energy is added to your existing energy.
>>
>> What is the minimum price need to clear all rounds.
>>
>> P.S. Initially you don't have any energy. At level i you don't know the
>> energies of devils present at i to n.
>>
>>
>> -Sreekanth
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.


Reply via email to