BIT / Offline

Find  the number of distinct elements in the range A to B