P5187 [COCI 2009/2010 #4] KABOOM

Description

**Translated from [COCI 2010.02](http://hsin.hr/coci/archive/2009_2010/) T5 “[KABOOM](http://hsin.hr/coci/archive/2009_2010/contest4_tasks.pdf)”.** **Pay attention to the time limit of this problem.** Luka found a strange tape in the laboratory. The tape is divided into $N$ segments, numbered from left to right as $1\ldots N$. The thickness of the tape can be ignored. The tape can only be bent at the junction between two segments, and it can only be folded by 180°. Obviously, the tape has two sides. One side of the tape is fully coated with extremely sticky glue, while on the other side, only the first $A$ segments and the last $B$ segments are coated with extremely sticky glue. How many ways can Luka fold the tape so that he can restore the scene (Luka’s hands will not stick to the tape, but if two glued sides stick together, Luka cannot pull them apart)? Output the answer modulo $10301$.

Input Format

The first line contains three integers $N, A, B$.

Output Format

Output one integer, the answer.

Explanation/Hint

#### Sample Explanation 1 ![](https://cdn.luogu.com.cn/upload/image_hosting/sbnvf1fm.png) #### Constraints and Notes $1\le A+B\le N\le 1000,$ $A>0,$ $B>0$. Translated by ChatGPT 5