Finding number of elements appearing exactly k times, in a given range

Revision en1, by kokcio, 2024-12-21 19:04:50

You are given an array which have at most 200000 elements. After that there are q queries. q<=200000. Each query contains three numbers s,e,k. How to for each query answer how many numbers in range [s,e] appear exactly k times? Is there any possibility to solve this without Mo's algorithm?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English kokcio 2024-12-21 19:04:50 364 Initial revision (published)