def xvector(p, n):

    vec = []
    if p == 0:    
        vec.append(1)  
    elif p == 1:    
        for i1 in range(n):        
            vec.append([i1]) 
    elif p == 2: 
        for i1 in range(n):
            for i2 in range(i1+1):           
                vec.append([i1, i2])
    elif p == 3:    
        for i1 in range(n):        
            for i2 in range(i1+1):            
                for i3 in range(i2+1):                
                    vec.append([i1, i2, i3])
    elif p == 4:    
        for i1 in range(n):        
            for i2 in range(i1+1):            
                for i3 in range(i2+1):                
                    for i4 in range(i3+1):                    
                        vec.append([i1, i2, i3, i4])

    return vec

# Copyright (c) 2011, Christopher Hoyle.
# Developed with the sponsorship of the Defense Advanced Research Projects Agency (DARPA).

# Permission is hereby granted, free of charge, to any person obtaining a copy of this data, 
# including any software or models in source or binary form, as well as any drawings, 
# specifications, and documentation (collectively "the Data"), 
# to deal in the Data without restriction, including without limitation the rights to 
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Data, 
# and to permit persons to whom the Data is furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Data.

# THE DATA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
# IN NO EVENT SHALL THE AUTHORS, SPONSORS, DEVELOPERS, CONTRIBUTORS, 
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
# WITH THE DATA OR THE USE OR OTHER DEALINGS IN THE DATA.
    



ab23d26cb824f051d0b60a63f231d51be4af57c3
<mask token>

def xvector(p, n):
    vec = []
    if p == 0:
        vec.append(1)
    elif p == 1:
        for i1 in range(n):
            vec.append([i1])
    elif p == 2:
        for i1 in range(n):
            for i2 in range(i1 + 1):
                vec.append([i1, i2])
    elif p == 3:
        for i1 in range(n):
            for i2 in range(i1 + 1):
                for i3 in range(i2 + 1):
                    vec.append([i1, i2, i3])
    elif p == 4:
        for i1 in range(n):
            for i2 in range(i1 + 1):
                for i3 in range(i2 + 1):
                    for i4 in range(i3 + 1):
                        vec.append([i1, i2, i3, i4])
    return vec

def xvector(p, n):

    vec = []
    if p == 0:    
        vec.append(1)  
    elif p == 1:    
        for i1 in range(n):        
            vec.append([i1]) 
    elif p == 2: 
        for i1 in range(n):
            for i2 in range(i1+1):           
                vec.append([i1, i2])
    elif p == 3:    
        for i1 in range(n):        
            for i2 in range(i1+1):            
                for i3 in range(i2+1):                
                    vec.append([i1, i2, i3])
    elif p == 4:    
        for i1 in range(n):        
            for i2 in range(i1+1):            
                for i3 in range(i2+1):                
                    for i4 in range(i3+1):                    
                        vec.append([i1, i2, i3, i4])

    return vec

# Copyright (c) 2011, Christopher Hoyle.
# Developed with the sponsorship of the Defense Advanced Research Projects Agency (DARPA).

# Permission is hereby granted, free of charge, to any person obtaining a copy of this data, 
# including any software or models in source or binary form, as well as any drawings, 
# specifications, and documentation (collectively "the Data"), 
# to deal in the Data without restriction, including without limitation the rights to 
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Data, 
# and to permit persons to whom the Data is furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Data.

# THE DATA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
# IN NO EVENT SHALL THE AUTHORS, SPONSORS, DEVELOPERS, CONTRIBUTORS, 
# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
# WITH THE DATA OR THE USE OR OTHER DEALINGS IN THE DATA.
    


