This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
import sys
input = sys.stdin.readline
k = int(input())
if k == 0:
print(0)
print(0, -1)
exit()
nodes = []
nodes.append((0, -1))
current_node = 1
paths = 0
while paths < k:
nodes.append((current_node, 0))
paths += 1
current_node += 1
print(len(nodes))
for node, parent in nodes:
print(node, parent)
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |