問題一覧 > 通常問題

No.1540 Series Toy

レベル : / AI推定難易度 : 2225 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 12
作問者 : 👑 qand / テスター : 57tggx logx Re_menal2 ゅゅ とりゐ
お気に入りにしたユーザー ProblemId : 6319 / 自分の提出
問題文最終更新日: 2021-06-06 16:34:10
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
ゅゅちゃんお誕生日コンテスト (順位表) の他の問題:

Problem Statement

Seeing Rumenaru trying to give Yuyu an integral toy as a birthday present, Sounansha decided to give a toy containing a series as a present.

When a sequence of positive integers $A=(A_1,\ldots,A_N)$ of length $N$ is put into this toy, it outputs the value of $\displaystyle\sum_{i=0}^\infty\binom{2i}i\frac1{16^i}\sum_{j=1}^N\frac{A_j}{2i+j}$.

However, Sounansha has become worried about whether this toy is working properly. Therefore, please write a program that finds the value the toy would output when working properly.

It can be proved that the value returned by this toy can always be expressed as $a+b\sqrt{3}+c\pi$ using rational numbers $a,b,c$, so output these as described in the Notes.

Here, $\displaystyle\binom{2i}i:=\frac{(2i)!}{i!^2}$. Furthermore, it can be proved that the only rational numbers $p,q,r$ satisfying $\displaystyle p+q\sqrt3+r\pi=0$ are $p=q=r=0$.

Notes

When outputting a rational number, first express it as a fraction $\displaystyle\frac pq$. Here, $p,q$ are integers, and $q$ must not be divisible by $998244353$ (under the constraints of this problem, such a representation is always possible). Then, output the unique integer $k$ satisfying $qk\equiv p \left(\text{mod}\ 998244353\right)$ that is at least $0$ and less than $998244353$.

Constraints

  • $1\le N\le 10^5$
  • $1\le A_i\le 10^6\ (1\le i\le N)$
  • All inputs are integers.
  • Input

    $N$
    $A_1\ \ldots\ A_N$
    

    Output

    Output the $3$ rational numbers $a,b,c$ satisfying $\displaystyle\sum_{i=0}^\infty\binom{2i}i\frac1{16^i}\sum_{j=1}^N\frac{A_j}{2i+j}=a+b\sqrt{3}+c\pi$, separated by spaces.

    Sample

    Sample 1
    Input
    1
    3
    Output
    0 0 1

    The value of the infinite series is $\pi$.

    Sample 2
    Input
    5
    1 11 111 1111 11111
    Output
    665508130 499076489 332770414

    The value of the infinite series is $\displaystyle\frac{35684}3-\frac{91375}2\sqrt{3}+\frac{66889}3\pi$.

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