当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

7054:Yiwen with Formula

题目描述
Given an array $a$ of length $n$, for any array $b$ satisfying $1 \leq b_i \leq n$ and $b_1<b_2<\cdots<b_k$ ($k$ is the length of $b$, $k \geq 1$), calculate:

$$\prod_{b_1<b_2<\cdots<b_k} (a_{b_1}+a_{b_2}+\cdots+a_{b_k})$$

输入解释
The input consists of multiple test cases.

The first line contains an integer $T$ ($1 \leq T \leq 10$) -- the number of test cases.

For each test case:

The first line contains an integer $n$ ($1 \leq n \leq 10^5$), which is the length of $a$.

The second line contains $n$ integers $a_i$ ($0 \leq a_i \leq 10^5$), which is the array $a$.

It is guaranteed that:
- The sum of $n$ over all test cases will not exceed $2.5 \times 10^5$.
- The sum of $a_i$ in a single test will not exceed $10^5$.
- The sum of $a_i$ over all test cases will not exceed $4\times 10^5$.

输出解释
For each test case, output the result modulo $998244353$ in a single line.
输入样例
3
2
1 1
3
1 1 2
5
4 6 9 1 5
输出样例
2
144
417630946

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-7054

最后修改于 2021-10-23T19:11:13+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
32000/16000MS(Java/Others) 524288/524288K(Java/Others)