# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
995678 | shikgom2 | Subway (info1cup19_subway) | Pypy 3 | 30 ms | 18552 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
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... |