Preprocessing the array
def preprocess ( arr , blk_sz , n , bit ) : NEW_LINE INDENT for i in range ( n ) : NEW_LINE INDENT update ( arr [ i ] , i // blk_sz , 1 , bit ) NEW_LINE DEDENT DEDENT def preprocessUpdate ( i , v , blk_sz , arr , bit ) : NEW_LINE