Stores count of elements less than or equal to the value mid in submatrix with bottom right vertices at ( i , j )
int X = Pre [ i ] [ j ] - Pre [ i - K ] [ j ] - Pre [ i ] [ j - K ] + Pre [ i - K ] [ j - K ] ;