33OJ
登录 注册

#P17740. [ICPC 2019 Xuzhou R] Loli, Yen-Jen, and a graph problem

    ID: 20399 远端评测题 1000ms 512MiB 尝试: 0 已通过: 0 显示难度提高+/省选− 上传者: 标签>2019Special JudgeICPC

[ICPC 2019 Xuzhou R] Loli, Yen-Jen, and a graph problem

Problem Description

Now, Yen-Jen is solving a problem with a cute catgirl. But he drinks too much yesterday and his mind is not open yet, so he asked you to solve the following problem for him!

There's a NN vertice complete graph. Please decompose the graph into N−1N - 1 trails, the ithi^{th} trail must contain exactly ii distinct edges. All edges must be decomposed in exactly one trail.

Input Format

The input contains only one line with one integer NN, the number of vertices in the complete graph.

  • 2≤N≤10002 \leq N \leq 1000

Output Format

If there's no way to decompose the graph, output −1-1 in a single line. Otherwise, output N−1N - 1 lines, the ithi^{th} line is the description of the ithi^{th} trail. In the ithi^{th} line, output i+1i + 1 integers represents the ithi^{th} trail. The neiboring integers in one line represents the edges.

3
1 2
2 3 1