問題一覧 > 通常問題

No.691 E869120 and Constructing Array 5

レベル : / AI推定難易度 : 2300 / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (AC するまで非表示) / 解いたユーザー数 11
作問者 : e869120 / テスター : WA_TLE
お気に入りにしたユーザー ProblemId : 1687 / 自分の提出
問題文最終更新日: 2026-06-25 10:01:56
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 191 (順位表) の他の問題:

Problem Statement

You are given $Q$ queries. For each query, construct a sequence $e$ as follows.

  • Let $A$ = $sqrt(e_1) + sqrt(e_2) + sqrt(e_3) + ... + sqrt(e_N)$.
  • The absolute error |$A-P_i$| is at most $10^{-10}$.
  • The length of the sequence $e$ is at most $30$. Also, each $e_i$ is a non-negative integer.

Input

$Q$
$P_1$
$P_2$
...
$P_Q$

Line $1$ contains an integer $Q$ between $1$ and $1 \ 000$, inclusive. $Q$ is the number of queries.
The following $Q$ lines, starting from line $2$, give the target values $P_i$. They satisfy $8 \ 000 \leq P_i \leq 12 \ 000$. Each $P_i$ is given to the 14th or 15th decimal place.
Include a newline at the end.

Output

$N$ $e_1$ $e_2$ ... $e_N$

For each query, print $N$ and $e_i$ separated by spaces on $1$ line, as shown above.
Since you must answer $Q$ queries in total, print $Q$ lines.

Sample

Sample 1
Input
4
10000.00000000000000
11234.00000000000000
10368.22067666386043
11507.39696137537560
Output
1 100000000
1 126202756
1 107500000
3 10000000 15000000 20000000

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。