Counting problem

Revision en1, by Sammmmmmm, 2024-05-29 17:13:04

Count the number of binary string of length N that satisfies the following M conditions:

The conditions can be 1 of 2 type

1 l r: There exists that least 1 '0' in the range [l, r]

2 l r: there exists at least 1 '1' in the range [l, r]

N <= 1e18

M <= 1e5

Thanks!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Sammmmmmm 2024-05-29 17:13:04 299 Initial revision (published)