The first line contains only one integer T, which indicates the number of test cases.
For each test case, the first line includes two numbers n, q($1 \leq n,q \leq 50000$). which indicate the length of sequence and the number of modifications.
The second line contains n numbers:$a_1,a_2,\cdots ,a_n$.
Then q lines, each line contain two numbers, $p_i,v_i(1 \leq p_i \leq n, 1 \leq v_i \leq 1000000)$.
Test data guarantee that $1 <\leq a_i \leq 1000000$ all the time and the sum of all n and q is less than or equal to $2 \times 10^5$.