<doocs>1829.Maximum XOR for Each Query_1.py
def getMaximumXor( nums: List[int], maximumBit: int) -> List[int]:
    n = len(nums)
    s = [0] * (n + 1)
    for i, x in enumerate(nums):
        s[i + 1] = s[i] ^ x
    ans = []
    for x in s[:0:-1]:
        t = 0
        for i in range(maximumBit):
            if ((x >> i) & 1) == 0:
                t |= 1 << i
        ans.append(t)
    return ans
def sample_funcname ( var_0 : List [ int ] , var_3 : int ) -> List [ int ] :
    var_5 = len ( var_0 )
    var_8 = [ 0 ] * ( var_5 + 1 )
    for var_10 , var_11 in enumerate ( var_0 ) :
        var_8 [ var_10 + 1 ] = var_8 [ var_10 ] ^ var_11
    var_12 = [ ]
    for var_11 in var_8 [ : 0 : - 1 ] :
        var_13 = 0
        for var_10 in range ( var_3 ) :
            if ( ( var_11 >> var_10 ) & 1 ) == 0 :
                var_13 |= 1 << var_10
        var_12.append ( var_13 )
    return var_12
