“…Proof For 1 ≤ i ≤ j ≤ n , we first use 2S(n, k) bits to support sorted 2-sided -k(1, 1, i, j, A) and -k(2, 2, i, j, A) queries in T(n, k) time. To answer -k(1, 2, i, j, A) query, we maintain succinct representations of G 12 and G 21 [8,18] using (4k + 4)n + ko(n) bits, and P A , Q 12 , and Q 21 using 3n bits. Now for 1 ≤ p ≤ k , let a p (resp., b p ) be the position of the p-th largest value in A 1 [i … j] (resp., A 2 [i … j] ), which can be answered in O(T(n, k)) time using the encoding of -k queries on each row.…”