| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 108 | 96 | 89 | 89.899% |
This problem adopts exactly the same definition of Fair Problemset as Problem H, “Fair Problemset”.
ICPC is a team competition. Each team has three members. At the beginning of a contest, most teams divide the 3ドルn$ problem evenly. They use one of two common methods to distribute problems:
The ICPC Seoul Regional Contest Scientific Committee must prepare a problemset consisting of 3ドルn$ problems. The difficulty of each problem is represented by an integer from 1ドル$ to $n,ドル inclusive. For each difficulty, there are exactly three problems with that difficulty. Thus, the arrangement of difficulties in the problemset can be viewed as a difficulty sequence of length 3ドルn$ containing three problems of each of the $n$ difficulty levels.
To prevent any advantage or disadvantage for a team based on their chosen problem distribution method, the ICPC Seoul Regional Contest Scientific Committee has defined a standard called a Fair Problemset. A difficulty sequence of length 3ドルn$ is called a Fair Problemset if it satisfies both of the following conditions:
In other words, regardless of which of the two methods is chosen, each team member must be assigned exactly one problem for each difficulty level from 1ドル$ to $n,ドル inclusive.
Given a positive integer $n,ドル write a program to find any Fair Problemset sequence of length 3ドルn$.
Your program is to read from standard input. The input consists of exactly one line. The line contains an integer $n$ (1ドル ≤ n ≤ 200$; $n$ is not divisible by 3ドル$). It can be shown that for every valid input, there exists at least one Fair Problemset sequence of length 3ドルn$.
Your program is to write to standard output. Print exactly one line consisting of 3ドルn$ space-separated positive integers, representing a Fair Problemset sequence of length 3ドルn$. Any valid Fair Problemset sequence of length 3ドルn$ will be accepted.
2
1 2 1 2 1 2
4
1 2 3 4 1 4 2 3 1 3 4 2
ICPC > Regionals > Asia Pacific > Korea > 2025 ICPC Asia Seoul Regional M번