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

建议使用的浏览器:

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

6316:Odd Shops

题目描述
In OddLand, there are many odd shops.
These shops only sell goods weighted from 1 to 10. For every weight i in [1,10], there are $a_i$ kinds of goods weighted i.
The shops are odd because one is only allowed to buy one item or nothing in each shop. And though goods in every shop are different, the array $a$ for each shop is the same.
As you love odd things so much, you wonder for how many total weights, there are odd ways to buy items in n odd shops to achieve this total weight. Since there might be many, output the number mod 998244353.
输入解释
There are multiple test cases, please read till the end of input file.
For each test case, the first line contain a single integer n, the number of odd shops.
The second line contain ten integers separated by spaces, $a_1,a_2...a_{10}$.
$1 \leq n \leq 10^9, 0 \leq a_i \leq 100$. No more than 10 test cases.
输出解释
For every test case, output the number of valid total weights mod 998244353.
输入样例
1
1 2 3 4 5 6 7 8 9 10
2
1 0 0 0 0 0 0 0 0 0
100
1 1 1 1 0 0 0 0 0 0
输出样例
6
2
35
来自杭电HDUOJ的附加信息
Recommend chendu

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

源链接: HDU-6316

最后修改于 2020-10-25T23:30:14+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)