Kaboom
의견: 0
Luka found an interesting tape in the chem lab. The tape is divided into \(N\) segments of equal length, and can easily be bent between two segments, but only by exactly \(180\) degrees.
One side of the tape is completely covered with a very volatile chemical. If the chemical comes in contact with itself, it reaches critical mass and explodes.
The other side of the tape is not completely covered yet. Only the first \(A\) segments and last \(B\) segments are covered, with the exact same chemical.
Write a program that will calculate the number of different ways Luka can bend the tape so that it does not explode. He can bend the tape more than once, and two ways are different if there is at least one bevel between segments that is not bent in one and is bent in the other.
Since the solution can be huge, print the result modulo \(10301\).
For \(N = 4\), \(A = 1\) and \(B = 1\) there are \(6\) possible ways.
The first and only line of input contains three natural numbers \(N\), \(A\) and \(B\) (\(A > 0\), \(B > 0\), \(A + B \le N \le 1000\)), total number of segments, number of covered segments from the left and from the right respectively.
The first and only line of output should contain the number of possible ways to bend the tape modulo \(10301\).
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Test 1 | 10점 | None |
Test 2 | 10점 | None |
Test 3 | 10점 | None |
Test 4 | 10점 | None |
Test 5 | 10점 | None |
Test 6 | 10점 | None |
Test 7 | 10점 | None |
Test 8 | 10점 | None |
Test 9 | 10점 | None |
Test 10 | 10점 | None |
4 1 165 2 216 1 27평가 및 의견
Kaboom
Log in to rate problems.
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Kaboom