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 [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/033c75c7-9858-43bf-aad8-3ff2f31fbe81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.