| TheForces Round #40 (Maths-Forces) |
|---|
| Finished |
There is an array $$$a$$$. Initially, $$$a = [0]$$$.
Assume that you can perform several operations. In the $$$i$$$-th operation, you can do exactly one of the following two operations:
You are given $$$q$$$ independent queries. For each query, you are given three integers $$$x$$$, $$$l$$$, and $$$r$$$ ($$$1 \leq$$$ $$$\boldsymbol{x \leq l}$$$ $$$\leq r$$$). Your task is to count the number of distinct arrays $$$a$$$ that satisfy the following conditions:
Since the answers may be large, you need to output them modulo $$$998\,244\,353$$$.
The first line contains an integer $$$q$$$ ($$$1 \le q \le 10^5$$$) — the number of queries.
Next, there are $$$q$$$ lines, each containing three space-separated integers $$$x$$$, $$$l$$$, and $$$r$$$ ($$$1 \leq \boldsymbol{x \leq l}$$$ $$$\leq r\le 10^6$$$).
For each query, output the answer modulo $$$998\,244\,353$$$ on a new line.
61 1 11 1 22 2 33 4 5800000 900000 10000001000000 1000000 1000000
2 6 20 384 146046122 463285462
In the first test case, all the $$$2$$$ possible arrays are:
In the second test case, all the $$$6$$$ possible arrays are:
| Name |
|---|


