Example #1
0
def gen():
	f = open("input.txt", "w")
	n = get(1, MAX)
	print(n, file = f)
	for i in range(2, n + 1):
		print(get(1, i - 1), end = " ", file = f)
	print(file = f)
def gen():
    f = open("input.txt", "w")
    n = get(1, MAXN)
    m = get(1, MAXA)
    print(n, m, file=f)
    for i in range(n):
        print(get(1, MAXA), get(1, MAXA), file=f)
Example #3
0
def gen():
    f = open("in", "w")
    n = get(1, N)
    print(n, file=f)
    for i in range(n):
        print(get(0, 1), end="", file=f)
    print(file=f)
def gen():
    f = open("input.txt", "w")
    n = get(1, 400)
    print(n, file=f)

    for i in range(2, n + 1):
        print(get(1, i - 1), i, file=f)
def gen():
    f = open("input.txt", "w")
    n = get(1, 4)
    print(n, file=f)
    for i in range(n):
        print(get(1, 3), end="", file=f)
    print(file=f)
def gen():
    f = open("input.txt", "w")
    n = get(6, 7)
    print(n, file=f)
    for i in range(n - 1):
        print(c[get(0, len(c) - 1)], end="", file=f)
    print(c[get(0, len(c) - 2)], file=f)
def gen():
    f = open("in", "w")
    n = get(1, 4)
    m = get(1, 2) * 2
    print(n, m, file=f)
    for i in range(n):
        print(get(1, 10), get(1, 10), file=f)
Example #8
0
def gen():
    f = open("input.txt", "w")
    n = get(1, 30)
    m = get(1, 30)
    print(n, m, file=f)
    for i in range(m):
        print(get(1, n), end=" ", file=f)
    print(file=f)
Example #9
0
def gen():
    f = open("input.txt", "w")
    b = get(1, 10)
    m = get(1, 10)
    n = get(1, 10)
    print(b, m, n, file=f)
    for i in range(n):
        print(get(1, 10), file=f)
Example #10
0
def gen():
    f = open("input.txt", "w")
    n = get(1, 100)
    k = get(1, n)
    print(n, k, file=f)
    for i in range(n - 1):
        print(get(1, i + 1), end=" ", file=f)
    print(file=f)
Example #11
0
def gen():
    f = open("input.txt", "w")
    n = get(1, 15)
    l = get(1, 5)
    print(n, file=f)
    for i in range(n):
        print(l, end=" ", file=f)
    print(file=f)
def gen():
	f = open("in", "w")
	print(1, file = f)
	n = get(1, 10)
	print(n, file = f)
	for i in range(n):
		print(get(1, n), end = " ", file = f)
	print(file = f)
def gen():
    f = open("input.txt", "w")
    n = get(1, MAX)
    m = get(1, MAX)
    k = get(0, MAX)
    print(n, m, k, file=f)
    for i in range(n):
        print(get(0, 2**m - 1), end=" ", file=f)
    print(file=f)
def gen():
	f = open("input.txt", "w")
	print(gen_num(), file = f)
	print(gen_num(), file = f)
	t = get(1, 1000)
	print(t, file = f)
	for i in range(t):
		print(get(1, 100000), end = " ", file = f)
	print(file = f)
def gen():
    f = open("input.txt", "w")
    n = get(1, 10)
    m = n
    print(n, m, file=f)
    for i in range(n):
        print(get(1, 20), get(1, 20), file=f)
    for i in range(m):
        print(get(1, 20), file=f)
Example #16
0
def gen():
    f = open("input.txt", "w")
    x = "0."
    l = get(1, 7)
    for i in range(l):
        x += c[get(0, len(c) - 1)]
    print(x, file=f)
    n = get(2, 100)
    print(n, file=f)
def gen():
	f = open("input.txt", "w")
	n = get(1, 30)
	print(n, file = f)
	for i in range(2, n + 1):
		print(i, get(1, i - 1), file = f)
	for i in range(n):
		print(get(1, 1000), end = " ", file = f)
	print(file = f)
Example #18
0
def gen():
	f = open("input.txt", "w")
	n = get(1, 15)
	print(n, file = f)
	a = []
	for i in range(n):
		x = get(1, 10)
		print(x, end = " ", file = f)
	print(file = f)
def gen():
    f = open("input.txt", "w")
    n = get(1, 100)
    a = get(1, 10)
    b = get(1, 10)
    c = get(1, 10)
    print(n, a, b, c, file=f)
    for i in range(n):
        print(get(1, 100), end=" ", file=f)
    print(file=f)
def gen():
	f = open("input.txt", "w")
	n = get(1, 9)
	print(n, file = f)
	for i in range(n):
		print(get(0, n), end = " ", file = f)
	print(file = f)
	for i in range(n):
		print(get(1, 10**6), end = " ", file = f)
	print(file = f)
def gen():
    f = open("input.txt", "w")
    for i in range(9):
        print(get(0, MX), end=" ", file=f)
    print(file=f)
    q = get(1, 10000)
    print(q, file=f)
    for i in range(q):
        print(get(0, MXVAL), end=" ", file=f)
    print(file=f)
def gen():
	f = open("input.txt", "w")
	t = get(1, 1000)
	print(t, file = f)
	for te in range(t):
		n = get(1, 10)
		print(n, file = f)
		for i in range(n):
			print(get(1, 100), end = " ", file = f)
		print(file = f)
def gen():
	f = open("input.txt", "w")
	n = get(1, 10)
	k = get(1, 10)
	print(n, k, file = f)
	for i in range(n):
		l = get(1, k)
		r = get(l, k)
		cost = get(1, 10)
		print(l, r, cost, file = f)
def gen_num():
	n = ""
	for i in range(get(1, 5)):
		if get(1, 2) == 2:
			n += "["
			n += str(get(1, 100))
			n += "]"
			n += str(get(0, 9))
		else:
			n += str(get(0, 9))
	return n
def gen():
    f = open("input.txt", "w")
    t = get(1, MAX)
    print(t, file=f)
    for i in range(t):
        n = get(1, MAX)
        m = get(1, MAX)
        while (n * m % 4 != 0):
            m += 1
        r = get(1, n)
        c = get(1, m)
        print(n, m, r, c, file=f)
def gen():
    f = open("input.txt", "w")
    n = get(1, 400)
    print(n, file=f)
    c = ["(", ")"]
    s = ""
    for i in range(n):
        s += c[get(0, len(c) - 1)]
    print(s, file=f)
    for i in range(2, n + 1):
        print(get(1, i - 1), end=" ", file=f)
    print(file=f)
Example #27
0
def gen():
    f = open("input.txt", "w")
    n = get(1, 10)
    print(n, file=f)
    a = []
    for i in range(n):
        x = get(1, 5)
        y = get(1, 5)
        while (x, y) in a:
            x = get(1, 5)
            y = get(1, 5)
        a.append((x, y))
        print(x, y, file=f)
Example #28
0
def gen():
    f = open("input.txt", "w")
    s = ""
    l = get(3, 10)
    for i in range(l):
        s += c[get(0, len(c) - 1)]
    print(s, file=f)
    q = get(2, 1000)
    print(q, file=f)
    for i in range(q):
        L = get(1, l)
        R = get(L, l)
        print(L, R, file=f)
def gen():
    f = open("in", "w")
    print(1, file=f)
    n = get(1, MX)
    k = get(1, n)
    print(n, k, file=f)
    for i in range(n):
        print(get(-MX, MX), end=" ", file=f)
    print(file=f)
    for i in range(k - 1):
        x = get(1, n - (k - 1 - i))
        n -= x
        print(x, end=" ", file=f)
    print(n, file=f)
def gen():
    f = open("input.txt", "w")
    n = get(2, 10)
    m = n - 1
    q = get(1, n)
    print(n, m, q, file=f)
    for i in range(2, n + 1):
        print(i, get(1, i - 1), file=f)
    a = []
    for i in range(q):
        x = get(1, n)
        while x in a:
            x = get(1, n)
        a.append(x)
        print(x, file=f)