예제 #1
0
def get_str():
    l = rand(7)
    string = "1"
    for a in range(l - 1):
        b = rand(2)
        if (b == 1):
            string += "0"
        else:
            string += "1"
    return string
예제 #2
0
파일: testgen2.py 프로젝트: srbcheema1/algo
from randy import rand,rand_arr,randomize,norm,norm_arr

t = 4
print(t)

for test in range(t):
    n = rand(10)
    print(n)
    for _ in range(n):
        print(rand(50),end = " ")
    print()


예제 #3
0
from randy import rand, rand_arr, randomize, norm, norm_arr
from srbIo import printf
from reader import reader

args = reader()
if (len(args) == 0):
    t_ = 1
else:
    t_ = int(args[0])

t = rand(t_)
print(t)

for test in range(t):
    """
    main test case loop
    """
예제 #4
0
from randy import rand, rand_arr, randomize, norm, norm_arr
from srbIo import printf
from reader import reader

args = reader()
if (len(args) == 0):
    t_ = 10
else:
    t_ = int(args[0])

t = t_
print(t)

for test in range(t):
    """
    main test case loop
    """
    n = rand(20)
    k = rand(20)
    print(n, k)
예제 #5
0
from randy import rand, rand_arr, randomize, norm, norm_arr
from srbIo import printf
from reader import reader

t = 50
print(t)

for test in range(t):
    """
    main test case loop
    """
    print(rand(2, 300))
예제 #6
0
from randy import rand, rand_arr, randomize, norm, norm_arr
from srbIo import printf
from reader import reader

args = reader()
if (len(args) == 0):
    t_ = 1
else:
    t_ = int(args[0])

t = rand(t_)
# print(t)


def get_str():
    l = rand(7)
    string = "1"
    for a in range(l - 1):
        b = rand(2)
        if (b == 1):
            string += "0"
        else:
            string += "1"
    return string


for test in range(t):
    """
    main test case loop
    """
    n = 5
예제 #7
0
from randy import rand, rand_arr, randomize, norm, norm_arr
from srbIo import printf
from reader import reader

args = reader()
if (len(args) == 0):
    t_ = 1
else:
    t_ = int(args[0])

t = rand(t_)
# print(t)

for test in range(t):
    """
    main test case loop
    """
    n = rand(10)
    k = rand(n)
    q = rand(20)
    print(n, q, k)
    for _ in range(n):
        a = rand(2)
        print(a % 2, end=' ')
    print()
    string = ""
    for _ in range(q):
        a = rand(2)
        if (a % 2):
            string += '!'
        else:
예제 #8
0
파일: testgen3.py 프로젝트: srbcheema1/algo
from randy import rand,rand_arr,randomize,norm,norm_arr
from srbIo import printf
from reader import reader

args = reader()
if(len(args)==0):
    t_ = 10
else:
    t_ = int(args[0])


t = rand(t_)
print(t)

for test in range(t):
    """
    main test case loop
    """
    i = rand(50)
    a = ""
    print(i)
    for _ in range(i):
        w = rand(2)
        if w == 2:
            a+='#'
        else:
            a+='.'
    print(a)


예제 #9
0
from randy import rand,rand_arr,randomize,norm,norm_arr
from srbIo import printf
from reader import reader

args = reader()
if(len(args)==0):
    t_ = 10
else:
    t_ = int(args[0])


t = t_
print(t_)

for test in range(t):
    """
    main test case loop
    """
    n = rand(20)
    print(n)
    for _ in range(n):
        print(rand(30),end=' ')
    print()