Counting

TimeLimit:3000MS  MemoryLimit:524288KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description
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$
Input
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)$.
Output
You should output $T$ lines, each contain a non-negative integer integer representing the answer
SampleInput
4
1
2
3
4
SampleOutput
1
4
38
650
Submit
题目统计信息详细
总AC数0
通过人数0
尝试人数0
总提交量0
AC率0.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: