QOJ.ac

QOJ

時間限制: 3 s 記憶體限制: 256 MB 總分: 100 可 Hack ✓

#18703. Inverso ㄷㄷㄷㅈ

统计

Mientras preparaban los datos para el problema D: ㄷㄷㄷㅈ, los autores de UCPC descubrieron que es difícil construir un árbol DUDUDUNGA con muchos vértices. Dado $N$, vamos a crear un programa que imprima un árbol DUDUDUNGA con $N$ vértices.

Entrada

En la primera línea se proporciona el número de vértices del árbol $N$. ($6 \le N \le 300\,000$)

Salida

Imprime $N-1$ líneas, cada una con los dos extremos de una arista separados por un espacio. Los números de los vértices deben ser enteros entre $1$ y $N$.

Ejemplos

Entrada 1

6

Salida 1

1 2
2 3
3 4
4 5
4 6

Nota

Para la definición del árbol DUDUDUNGA, consulta el problema D: ㄷㄷㄷㅈ. Para el $N$ dado en la entrada, siempre existe un árbol DUDUDUNGA con $N$ vértices.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.