QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 2048 MB Total points: 100

#9710. Loli, Yen-Jen, and a graph problem

الإحصائيات

Yen-Jen loves loli very much!!!

Now, he is solving a problem with a cute, cat-eared loli. 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 $N$ vertice complete graph. Please decompose the graph into $N - 1$ trials, the $i^{th}$ trial must contain exactly $i$ distinct edges. All edges must be decomposed in exactly one trial.

Input

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

  • $2 \leq N \leq 1000$

Output

If there's no way to decompose the graph, output -1 in a single line.

Otherwise, output $N - 1$ lines, the $i^{th}$ line is the description of the $i^{th}$ trial. In the $i^{th}$ line, output $i + 1$ integers represents the $i^{th}$ trial. The neiboring integers in one line represents the edges!

Please, do not output trailing spaces in every line!

Sample Input

3

Sample Output

1 2
2 3 1
About Issues

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.