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

建议使用的浏览器:

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

6846:Counting

题目描述
Notice:Don't output extra spaces at the end of one line.

Koishi loves counting problems.

There are two permutations $P_1,P_2$. Each permutation consists of $n$ integers from $1$ to $n$.

Koishi wants to merge them. She has an array $A$. Initially $A$ is empty. In each operation, Koishi will compare two head elements of $P_1,P_2$, select the smaller one, erase it from the permutation and append it to $A$, if the two head elements are the same, Koishi can select one of them arbitrarily, and if one of permutation is already empty, Koishi will select the head element from the other one. Koishi will do this operation repeatedly until the two permutations are all empty.

What's more, Koishi can also select $P_1$ and $P_2$ arbitrarily. Given $n$,How many different $A$ can be generated? modulo $998244353$
输入解释
The first line contains an positive integer $T(1\leq T\leq 10^5)$. There are $T$ test cases.
The following $T$ lines, each contains an positive integer $n(1\leq n\leq 10^5)$.
输出解释
You should output $T$ lines, each contain a non-negative integer integer representing the answer
输入样例
4
1
2
3
4
输出样例
1
4
38
650
来自杭电HDUOJ的附加信息
Recommend IceyWang

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

源链接: HDU-6846

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

共提交 0

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