Time limit
2s
Memory limit
128 MB
Sejun has a convex polygon with N distinct vertices. One cut must connect two vertices of the current polygon, and the cut is valid only when it divides one polygon into exactly two polygons.
Write a program that counts how many different ways there are to divide the convex N-gon into exactly K polygons.
The first line contains two integers N and K.
3 <= N <= 1001 <= K <= 100Print the number of valid divisions modulo 1000000000.
If it is impossible to divide the N-gon into exactly K polygons, print -1.