hdu 6703 array(权值线段树)
Problem Description a 1 , a 2 , . . . , a n ( i ∈ [ 1 , n ] , 1 ≤ a i ≤ n ) . Initially, each element of the array is **unique**. m Each instruction is in one of the following two formats: ( 1 , p o s ) a p o s a p o s + 10 , 000 , 000 ; ( 2 , r , k ) a i 1 ≤ i ≤ r k . 2 . Input T ( 1 ≤ T ≤ 10 ) , denoting the number of test cases. n ( 1 ≤ n ≤ 100 , 000 ) , m ( 1 ≤ m ≤ 100 , 000 ) a n a 1 , a 2 , . . . , a n ( i ∈ [ 1 , n ] , 1 ≤ a i ≤ n ) ,denoting the array. m ( 1 , t 1 ) ( 2 , t 2 , t 3 ) . The parameters of each instruction are generated by such way : 1 p o s = t 1 L a s t A n s 1 ≤ p o s