Your solution fails for the small case when the complexity is 1. In that
case you have to uncover every tile. Your assumption that all the students
will see gold when the first tile is gold is only valid when the complexity
is at least 2.


On Mon, Apr 11, 2016 at 11:35 AM, frederik <frederikcreem...@gmail.com>
wrote:

> Hi,
>
> For the fractiles problem, I reasoned as follows:
>
> Let O be the original sequence,
> Let Ai be the sequence with complexity i, obtained from O.
>
> Then, if the first tile of O is L, the first K tiles of Ai will be O.
>           if the first tile of O is G, then first K tiles of Ai will all
> be G.
>
> So you could determine whether O has any gold tiles by placing students at
> tiles 2 through k inclusive, right?
>
> If the first tile is gold, then all students will see gold tiles. If any
> of the other tiles are gold, then the corresponding student will see a gold
> tile.
>
> So, I just listed all the integers from 2 to k for the small input, but it
> wasn't accepted. Can anyone tell me why? The source code in python:
> https://gist.github.com/bigblind/1a36801e7ef7bb4c07b4566c4b386dbe
>
> Thanks to the problem analysis, I understand it wouldn't work for the
> large test case, and lines 18-19 are irrelevant for the small test case, so
> they aren't the issue
>
>
>
> --
> 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/033c75c7-9858-43bf-aad8-3ff2f31fbe81%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/CAMAzhzjG3ax%3DKNq4ABoSY7_vgZpJ8HAf_k8%2Bq2f-hNcsM5OgLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to