题目描述
We have a sequence of $N$ numbers: $A = (a_1, a_2, \dots, a_N)$.
Process the $Q$ queries explained below.
- Query $i$: You are given a pair of integers $(x_i, k_i)$. Let us look at the elements of $A$ one by one from the beginning: $a_1, a_2, \dots$ Which element will be the $k_i$\-th occurrence of the number $x_i$?
Print the index of that element, or $-1$ if there is no such element.
### Constraints
- $1 \leq N \leq 2 \times 10^5$
- $1 \leq Q \leq 2 \times 10^5$
- $0 \leq a_i \leq 10^9$ $(1 \leq i \leq N)$
- $0 \leq x_i \leq 10^9$ $(1 \leq i \leq Q)$
- $1 \leq k_i \leq N$ $(1 \leq i \leq Q)$
- All values in input are integers.