def __setitem__(self, i, v):
        """ sets t[i] to v.
            :complexity: O(log len(t))
        """
        p = self.N + i
        self.s[p] = v
        p //= 2                                    # climb up the tree
        while p > 0:                               # update node
            self.s[p] = min(self.s[2 * p], self.s[2 * p + 1])
            p //= 2
def __setitem__ ( self , i , v ) : p = self . N + i self . s [ p ] = v p //= 2 while p > 0 : self . s [ p ] = min ( self . s [ 2 * p ] , self . s [ 2 * p + 1 ] ) p //= 2
sets t[i] to v.
            :complexity: O(log len(t))