Logo
(追記) (追記ここまで)

33430번 - Operator Precedence 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB219888.889%

문제

Randias is facing his primary school homework:

Find a nonzero integer sequence $a$ of length 2ドルn$ satisfying

\begin{alignat*}{26} (&a_1 &\times& &a_2&)&+&(&a_3& &\times& &a_4&)&+& & \ldots & & &+&(&a_{2n-1}& &\times& a_{2n}&)\\ = &a_1 &\times&(&a_2& &+& &a_3&)&\times&(&a_4& &+& a_5)\times& \ldots & \times&(a_{2n-2} &+& &a_{2n-1}&)&\times& a_{2n}&\ne 0\text{.} \end{alignat*}

In shorter form, $\sum\limits_{i=1}^n a_{2i-1} a_{2i} = a_1 a_{2n} \prod\limits_{i=2}^{n} (a_{2i-2} + a_{2i-1}) \ne 0$.

Of course, Randias knows how to solve it. But he wants to give you a test. Can you solve the question above?

입력

Each test contains multiple test cases. The first line contains a single integer $t$ (1ドル \leq t \leq 10^5$) denoting the number of test cases.

For each test case, the only line contains a single integer $n$ (2ドル \le n \le 10^5$).

It is guaranteed that the sum of $n$ over all test cases does not exceed 2ドル \cdot 10^5$.

출력

For each test case, output one line with 2ドル n$ integers: $a_1, a_2, \ldots, a_{2n}$ (1ドル \le |a_i| \le 10^{10}$).

It can be shown that the answer always exists.

If there are several possible answers, output any one of them.

제한

예제 입력 1

3
2
3
4

예제 출력 1

1 -3 -3 1
1 -10 6 6 -10 1
1 -15 10 -1 -1 10 -15 1

힌트

출처

Camp > Petrozavodsk Programming Camp > Winter 2024 > Day 3: ZJU Contest D번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /