問題一覧 > 通常問題

No.2625 Bouns Ai

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 100
作問者 : 👑 AngrySadEight / テスター : aplysiaSheep zeta7532
お気に入りにしたユーザー ProblemId : 10500 / 自分の提出
問題文最終更新日: 2024-01-10 15:21:18
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 417 (順位表) の他の問題:

Problem Statement

In a certain game, a score is awarded according to the content of the play.

The score metrics consist of a provisional score and bonus points, and the sum of the provisional score and the bonus points is called the true score. Here, the provisional score, the bonus points, and the true score are all always integers between $0$ and $10^5$, inclusive.

Now, $N$ players played this game, and the bonus points of the $i$-th player were $A_i$.

In addition, the following is known about the scores of these $N$ players.

  • Letting $B_i$ be the provisional score of the $i$-th player, $B_1 \leq B_2 \leq \dots \leq B_N$ holds.
  • Letting $C_i$ be the true score of the $i$-th player, $C_1 \leq C_2 \leq \dots \leq C_N$ holds.

Find the total number of possible combinations of the true scores of the $N$ players, modulo $998244353$.

Note that $2$ combinations are distinguished if there exists a player whose true score differs between them.

Constraints

  • All inputs are integers.
  • $1 \leq N \leq 200$
  • $0 \leq A_i \leq 10^5$

Input

The input is given from standard input in the following format.

$N$
$A_1$ $A_2$ $\dots$ $A_N$

Output

Output the answer.

Sample

Sample 1
Input
2
1 99998
Output
6

The following $6$ ways are possible.

  • $B = (0, 0), C = (1, 99998)$
  • $B = (0, 1), C = (1, 99999)$
  • $B = (0, 2), C = (1, 100000)$
  • $B = (1, 1), C = (2, 99999)$
  • $B = (1, 2), C = (2, 100000)$
  • $B = (2, 2), C = (3, 100000)$

Sample 2
Input
1
0
Output
100001

There is only $1$ player and the bonus points are $0$, so the provisional score and the true score have the same value. That value can be any of the $100001$ values between $0$ and $100000$, inclusive.

Sample 3
Input
9
31 41 59 26 53 58 97 93 23
Output
454568508

Output the remainder when divided by $998244353$.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。