P1641 [SCOI2010] Generate String
Description
lxhgww recently received a task to generate a string. The task requires him to use $n$ copies of $1$ and $m$ copies of $0$ to form a string, and it also requires that in any first $k\ (0 \le k \le n+m)$ characters, the number of $1$ is not less than the number of $0$. Now lxhgww wants to know how many strings satisfy the requirement. Can you help him?
The answer is taken modulo $20100403$.
Input Format
The input contains a single line with $2$ integers $n$ and $m$.
Output Format
Output a single line with $1$ integer, the number of strings that satisfy the requirement.
The answer is taken modulo $20100403$.
Explanation/Hint
For $30\%$ of the testdata, it is guaranteed that $1 \leq m \leq n \leq 10^3$.
For $100\%$ of the testdata, it is guaranteed that $1 \leq m \leq n \leq 10^6$.
Translated by ChatGPT 5