As you can see, we have the new representation for an 01 string that is a
sequence of length M whose elements stands for the number of 0s or 1s.
For example, you can change 100111 into [1, 2, 3]. If M is odd, then the
last bit must be 1, otherwise it must be 0.
According to the new representation, I think you can solve the problem. If
you meet difficulties, you can check the video
https://www.youtube.com/watch?v=EOKRSfiNpWY&t=3624s.

XYZT <nikhil...@gmail.com> 于2021年5月3日周一 下午10:04写道:

> Hi,
>
> I am trying to understand the analysis section for this problem:
> https://codingcompetitions.withgoogle.com/codejam/round/00000000004362d7/00000000007c1139#analysis
>
> The analysis makes the claim: "Let's say there are M bit groups in the
> suffix we need to create, then we will also need to apply M or M+1 NOT
> operations, depending on the parity of M and the first bit of the prefix."
>
> I am having trouble understanding why this would depend on the "parity of
> M" and the first bit of the prefix! (I am also confused about which bit is
> considered "first" - is it the left-most or right-most one?)
>
> I've tried working out some toy examples and in none of them does the
> number of NOT operation seem to depend on these particular factors.
>
> What am I missing?
>
> Thanks!
> XYZT
>
> --
> -- You received this message because you are subscribed to the Google
> Groups Code Jam group. To post to this group, send email to
> google-code@googlegroups.com. To unsubscribe from this group, send email
> to google-code+unsubscr...@googlegroups.com. For more options, visit this
> group at https://groups.google.com/d/forum/google-code?hl=en
> ---
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/137c3e3e-894a-4058-abac-b0edf5dc2695n%40googlegroups.com
> <https://groups.google.com/d/msgid/google-code/137c3e3e-894a-4058-abac-b0edf5dc2695n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- You received this message because you are subscribed to the Google Groups 
Code Jam group. To post to this group, send email to 
google-code@googlegroups.com. To unsubscribe from this group, send email to 
google-code+unsubscr...@googlegroups.com. For more options, visit this group at 
https://groups.google.com/d/forum/google-code?hl=en
--- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAA%2B-T8mx93CeFAaCZ5nBB5Y55KF%3DuKvOCs3Fr%3D4WpaZEZdo7tQ%40mail.gmail.com.

Reply via email to