Problem 3159 · Medium
Record the positions of x in order, then answer each query with the position of its occurrence number.
Open the interactive visualisation