| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 2048 MB | 6 | 5 | 3 | 100.000% |
One day, dnialh mentioned that optimizing geometric construction perfectly is not possible. Oh, very well. You will see about that.
You are given a positive integer $n$ such that 2ドル \le n \le 1,320円$. Please find a sequence of $n$ points on the plane, $X_1,X_2,\cdots,X_n,ドル satisfying the following constraints.
It is proven that such a sequence of points exists under the constraints of this task.
A positive integer $n$ is given on one line. (2ドル \le n \le 1,320円$)
Output $n$ lines. The $i$-th line must contain $x_i$ and $y_i,ドル the coordinates of $X_i,ドル separated by a space. ($-1,000円 \le x_i,y_i \le 1,000円$)
4
-2 -2 1 2 -2 2 2 1
In the samples, $n=4$ and $X=[(-2,-2),(1,2),(-2,2),(2,1)]$.
Here, $f(i)$ is determined as follows.
Now, one can manually verify that the resultant sequence $p=[1,3,2,4]$ is a permutation of 1,2,3,4ドル$. Therefore, the sequence of points satisfies the constraints.
Camp > Osijek Competitive Programming Camp > Summer 2024 > Day 5: OCPC Potluck Contest 2 H번