Update the values of all ancestors of idx
updateBIT ( BITree , n , idx , val ) NEW_LINE else : NEW_LINE k = q [ i ] [ 1 ] NEW_LINE lb = getLowerBound ( BITree , A , n , k ) NEW_LINE print ( lb ) NEW_LINE