How to solve this digit DP question?

Revision en1, by hydro_lyte, 2019-10-23 14:21:56

The question is- We are given two integers L and R. We are required to determine the count of special numbers ranging in between L and R. If the binary representation of X contains a pattern 101, then X is called special number. Constraints- 1 ≤ L ≤ R ≤ 10^18

Tags digit dp, #dp, #dynamic programing

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English hydro_lyte 2019-10-23 14:22:56 75
en1 English hydro_lyte 2019-10-23 14:21:56 297 Initial revision (published)