Universal Cup Judging System

Universal Cup

시간 제한: 3.0 s 메모리 제한: 1024 MB 총점: 100 해킹 가능 ✓
통계

整数 $r$ が与えられます。

次の条件をすべて満たす、整数座標を持つ互いに異なる 6 個の点 $P_1,P_2,\ldots,P_6$ を構成してください。

  • $P_1,P_2,P_3,P_4$ は、半径がちょうど $r$ の同一の円周上にある。
  • $P_3,P_4,P_5,P_6$ は、同一の円周上にある。
  • $P_1,P_2,P_5,P_6$ は、同一の円周上にある。
  • 上記の 3 つの円は互いに異なる。

3 つの円の中心の座標は整数である必要はありません。2 番目と 3 番目の円の半径も整数である必要はありません。構成する 6 個の点の座標だけが整数である必要があります。

入力

最初の行には、テストケース数を表す 1 個の整数 $t$($1\le t\le 50$)が与えられます。

続く $t$ 行にはそれぞれ、最初の円に必要な半径を表す 1 個の整数 $r$($1\le r\le 150$)が与えられます。

出力

各テストケースについて、6 行出力してください。$i$ 行目には、$P_i$ の座標を表す 2 個の整数 $x_i,y_i$($|x_i|,|y_i|\le 10\,000$)を出力してください。

条件を満たす構成が複数存在する場合、そのうちのどれを出力してもかまいません。

入出力例

入力 1

1
10

出力 1

6 8
10 0
-8 -6
0 10
13 15
15 15

注記

この例は、可能な構成の 1 つを示しています。他の正しい構成も受理されます。

problem_20731_d635b0595747deccafc11800a476ad9c.png

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.