I wouldn't use a dynamic programming approach for this problem. This is
what I'd call a "case bashing" problem, where you try to think of all the
possible cases, and the solution for each one is straightforward.

For this problem:
You have a lot of freedom to set up doors however you like. Under what
circumstances is it impossible to let k people escape?
Imagine a fairly generic simple case (like 5 5 12) and think about a simple
"possible" solution that you can write by hand. Then generalize it to code.
Then start thinking of cases where that manual solution doesn't work.
In particular, look for the edge cases: r=1, c=1, k=0, k=r*c, and cases
near those.

Good luck!
Bartholomew

On Mon, Feb 3, 2020 at 9:32 AM Soumi <[email protected]> wrote:

> cannot understand the dynamic programming approach used in grid escape.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/1a7c4c9b-a02c-4313-8ab3-71f5953f93be%40googlegroups.com
> <https://groups.google.com/d/msgid/google-code/1a7c4c9b-a02c-4313-8ab3-71f5953f93be%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAHaiWHOaegeQcaXwYx4ifQ5isEiR416YLjcfSc2XBH-P_ddp%3DQ%40mail.gmail.com.

Reply via email to