luogu#P5388. [Cnoi2019] 最终幻想
[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 -dimensional hypersphere. Find how many -dimensional regions it can be divided into using -dimensional hyperplanes.
Take the answer modulo .
Input Format
Input two numbers .
Output Format
One line, the answer.
3 4
15
Hint
Subtask 1 (21 pts): .
Subtask 2 (7 pts): .
Subtask 3 (72 pts): No special restrictions.
Constraints: For of the testdata, .
Translated by ChatGPT 5