@staticmethod
def bitwise_dot(a, b):
    if using_numpy:
        return np.bitwise_xor.reduce((a[:, None, :] & b.T[None, :, :]), axis=(- 1))
    else:
        assert (len(a[0]) == len(b))
        c = [([0] * len(b[0])) for _ in range(len(a))]
        for i in range(len(a)):
            for j in range(len(b[0])):
                for k in range(len(b)):
                    c[i][j] ^= (a[i][k] & b[k][j])
        return c
@staticmethod
def bitwise_dot(a, b):
    if using_numpy:
        return np.bitwise_xor.reduce((a[:, None, :] & b.T[None, :, :]), axis=(- 1))
    else:
        assert (len(a[0]) == len(b))
        c = [([0] * len(b[0])) for _ in range(len(a))]
        for i in range(len(a)):
            for j in range(len(b[0])):
                for k in range(len(b)):
                    c[i][j] ^= (a[i][k] & b[k][j])
        return c