I think your code gives wrong answer on the cases like:
1
5 1
1 1 2 3 4
Its output should be 4 (Day1:a[0], Day2:a[2], Day3:a[3], Day4:a[4]) but
your code gives 1.

Maybe the inner loop is missing the possibility that if current a[index] is
already expired then Lucy can try to eat a[++index]  :D

On Tue, Sep 18, 2018 at 8:19 PM Akshay Mittal <akshaycano...@gmail.com>
wrote:

> just make sure you add comments and output statements saying what your
> trying to do.
> which might help others help you.
>
> --
> 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 google-code+unsubscr...@googlegroups.com.
> To post to this group, send email to google-code@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/222a4805-b60f-47cd-ad7e-227f2fb471ca%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 google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CACmYGGQDfM3f6zz_LrWSJA%3D%2BCKka0L8HBQb6oVSXuXxSO5rFyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to