Given a sequence \(a_1, a_2,\cdots, a_m\), there is a sliding window of size \(k\) from the very left of the sequence to the very right. You can only see the \(k\) numbers in the window. Each time the sliding window moves right by one position.
For each time there is an integer \(n_i\), you are asked the \(n_i\)-th element in the window. The k-th element indicates that the element will be in the k-th position after sorting in ascending order.