luogu#P5388. [Cnoi2019] 最终幻想

    ID: 4212 远端评测题 1000ms 125MiB 尝试: 0 已通过: 0 难度: 9 上传者: 标签>递推2019组合数学快速数论变换 NTT

[Cnoi2019] 最终幻想

Background

In theory, the final problem should be a data structure problem, but it got delayed again and again.

Problem Description

You have an nn-dimensional hypersphere. Find how many nn-dimensional regions it can be divided into using kk (n1)(n-1)-dimensional hyperplanes.

Take the answer modulo 998244353998244353.

Input Format

Input two numbers n,kn, k.

Output Format

One line, the answer.

3 4
15

Hint

Subtask 1 (21 pts): n106n \le 10^6.

Subtask 2 (7 pts): knk \le n.

Subtask 3 (72 pts): No special restrictions.

Constraints: For 100%100\% of the testdata, n,k[1,998244353)n, k \in [1, 998244353).

Translated by ChatGPT 5