No.1044 Honest University
Problem Statement
Takahashi is a student at Honest University (abbreviated as Honest U).
Today, there is a social party between Honest University and Liar University (abbreviated as Liar U). $N$ students from Honest University, including Takahashi, and $M$ students from Liar University attend the party.
At the beginning of the party, all $N+M$ students line up in a circle, and one by one each introduces the participant to their right. In an introduction, it is always announced which university the introduced student belongs to. If the introducing student belongs to Honest University, the announcement is correct; if the introducing student belongs to Liar University, the announcement is the opposite of the introduced student's actual affiliation.
Takahashi is happy when there are many honest people, so he becomes happy if $K$ or more people at the party, including the student he introduced, are announced as belonging to Honest University. Since Takahashi is honest, he never doubts the announcements. Find the number of combinations of announcements that make Takahashi happy, modulo $1000000007$. Note that $2$ combinations of announcements are considered different when there exists a student such that the student introduced by that student differs; the order of the announcements does not matter.
Input
$N\ M\ K$
$1 \le N,M \le 10^5$
$0 \le K \le 2 \times 10^5$
$K \le N+M$
Output
Output the number of arrangements that make Takahashi happy, modulo $1000000007$.
Sample
Sample 1
Input
1 1 0
Output
1
There is only $1$ possible arrangement.
Sample 2
Input
2 2 1
Output
4
Sample 3
Input
765 346 315
Output
716277124
(Correction at 21:49: 716177124→716277124. We apologize for the error in the sample.)
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
Suunn
cureskol