Need a solution using bitmasking.

Revision en1, by PyAgni, 2020-04-02 05:06:38

B. Chloe and the sequence

I'm able to solve this problem using binary search. But some people have solved it using bitmasking alone. For example, check this solution by kmjp. Can someone please explain his solution or a similar one using bitmasking alone. Thanks.

Tags bitmasking, kmjp, help

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English PyAgni 2020-04-02 05:06:38 526 Initial revision (published)