Problem 3624 · Hard

Number of Integers With Popcount-Depth Equal to K II

The popcount-depth of a positive integer is how many times you must replace it with its count of set bits before reaching 1. Handle a stream of point updates and range queries, each query asking how many array entries in a range have depth exactly k.

Open the interactive visualisation