B: Try to get the number of pancakes of all plates under N where 1 <= N <= 1000. Try for all N and get the best answer. Time: O(ND) C: My initial solution was to use a suffix and prefix product and then search the sequence of strings, taking into account the product with an entire sequence. The time complexity was approximately O(100L) but it would be higher with state transitions. However after the contest I realized a greedy solution would suffice. D: You can just hand compute all the cases. When X>6, Richard always wins. For X=6 and X=5, that is up to you to find out ;)
On Sat, Apr 11, 2015 at 10:48 PM, al mashud <[email protected]> wrote: > which algorithms can be used for solving problem B,C and D...? > > -- > 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 post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-code/f47a547a-72a4-4761-9b0e-1a027030eb76%40googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/CAOOYsbgLO3xZ2PZNXG_Kn6B7BVW3opYTqBfBt06_fvWRmTr%3DPA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
