$$$~\\$$$
Be there, or be squared! In the vast, shimmering expanse of the digital stream, where data flows like rivers of light, Neuro-sama and her mischievous sister, Evil, are locked in a high-stakes game of hide-and-seek. The stream is a labyrinth of $$$n$$$ nodes, each glowing with a unique identifier from $$$1$$$ to $$$n$$$, pulsing with electric pathways.
For any node $$$u$$$, the digital pathways twist and turn under the following rules:
Evil has hidden herself, leaving only $$$q$$$ suspicious locations. Now, Neuro wonders: for each possible hiding spot $$$x$$$, how many nodes in the network (from $$$1$$$ to $$$n$$$) can reach it?
Since the number may be large, she wants to output it modulo $$$998244353$$$.
Each test contains multiple test cases. The first line contains the number of test cases $$$T$$$ $$$(1\le T \le 100)$$$. The description of the test cases follows.
The first line of each test contains two integers $$$n, q$$$ $$$(1\le n\le 10^{12}, 1\le q \le 10^6)$$$.
Each of the next $$$q$$$ lines contains one integer $$$x$$$ $$$(1\le x \le n)$$$.
It is guaranteed that the sum of $$$n$$$ in the test cases does not exceed $$$10^{12}$$$, and the sum of $$$q$$$ does not exceed $$$10^6$$$.
For each query of each test case, output the number of points connected to $$$x$$$ modulo $$$998244353$$$ on a separate line.
21219 512345325 391021
1 182 363 181 270 108 22 85
| Name |
|---|


