F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Counting

Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)
Total Submission(s): 25    Accepted Submission(s): 20


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
 

Sample Input
4 1 2 3 4
 

Sample Output
1 4 38 650
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-26 12:22:44, Gzip enabled