Chocolate triangles
시간 제한4초메모리 제한1024 MB
볼록 n각형을 서로 교차하지 않는 대각선으로 정확히 k개의 삼각형으로 자르는 방법의 수를 1e9+9로 나눈 나머지를 구한다.
문제
"Tortoff" Inc. makes your favorite chocolate products. For your convenience we produce chocolate exclusively in the shape of convex polygon. You can break it into pieces along any non-intersecting diagonals. According to our expert surveys the tastiest pieces of chocolate are triangular. Any customer can help us improve the quality of our products. It is important for us to know the number of ways our exclusive chocolate can be broken into exactly triangular parts.
입력
Single line contains integers and (, ).
출력
Output the number of ways the -polygon can be cut into exactly triangular parts along non-intersecting diagonals inside the polygon. Output answer modulo ().