#P11057. 诈骗题
诈骗题
Background
This is a scam problem.
Problem Description
Define as the answer to the following problem.
Consider an black-and-white grid, which is initially all white. Each operation is as follows:
- Choose a white cell and paint the entire row containing it black. This operation is called .
- Choose a white cell and paint the entire column containing it black. This operation is called .
Suppose you can perform at most operations. Ask:
- Among all plans that perform operations, how many essentially different operation sets are there? An operation set is a set of size representing the operations that were performed. (Note that two plans with different orders but the same operation set are only counted once.)
Two operation sets are called essentially different if and only if there exists an operation such that .
Now given , please compute the value of for all .
Since the answer may be large, you only need to output it modulo .
Input Format
One line containing two positive integers .
Output Format
Output a matrix with rows and columns. The number in row and column should be .
2 2
2 3
3 16
Hint
Sample Explanation
For , we have . There are the following possible operation sets:
Note that for the last set, there is more than one operation order, but since they correspond to the same operation set, it is only counted once in the answer.
Constraints
The Luogu code length limit is .
| Test Point ID | ||
|---|---|---|
For all testdata, it is guaranteed that 。
Translated by ChatGPT 5