When running my
[1] locally, all of my test cases pass. I would appreciate a positive test case that fails on my code or some help identifying a bug. I'm sure I have overlooked something. Thanks for your help.
[1]: http://www.codechef.com/viewsolution/2192660
@kakridge : In your solution , the answer can never be more than 64 . However the answer to the question can be much bigger . So obviously there is a flaw in your logic .
I understand what you are saying, but the answer can be more than 64. I have successfully processed the first 104 bits in the Thue-Morse sequence @ https://oeis.org/A010060/list. My assumption is that the sequence repeats, but flips every 64 characters. So if A = 0110 and B = 1001: ABBABAABBAABABBA => BAABABBAABBABAAB. However, I am now realizing that is incorrect. I need to fix my binary complement creation. Your questioning of the 64 helped me find that. Thanks. Will post back an update later today (hopefully).