Pirouettes

시간 제한1초메모리 제한1024 MB

요약
2N개의 내부 정수 점 중 K개에 장애물을 놓을 때, 공이 T번 단위 이동으로 장애물과 벽에 튕기며 시작점 0으로 돌아오는 배치의 수를 센다.
난이도

보통10점 중 7점

유형
동적 계획법, 조합론, 시뮬레이션
정답자
아직 제출이 없습니다

문제

Given an integer NN, consider a room of length 2×N+22 \times N+2 represented as an interval \[−N−1,N+1]\[-N-1,N+1]. In the center C=0C=0 of the room, there's initially a ballerina called Costelina Salopeta. She's about to perform TT dancing steps of length 11, the first one being to the right. In the 2×N2 \times N points of integer coordinates in the room you can place KK obstacles. When the ballerina reaches an obstacle, she trips and performs a pirouette. This way, she changes moving direction and the obstacle disappears.

You are not allowed to add an obstacle at coordinates −N−1-N-1, 00 or N+1N+1. The walls of the room at coordinates −N−1-N-1 and N+1N+1 are considered to be permanent obstacles, that are never going to disappear, and the point of coordinate C=0C=0 is the initial position of Costelina.

Given the values of TT, NN and KK, compute the number of ways of placing KK obstacles, such that after TT steps Costelina will end back in the starting point CC.

입력

The first line contains 33 integers TT, NN and KK.

출력

Output a single integer representing the answer modulo 109+710^9+7.

제한

  • 0≤T≤2000≤T≤200, TT is even
  • 1≤N≤1001≤N≤100
  • 0≤K≤2×N0≤K≤2 \times N

예제2

  1. 예제 1

    입력
    6 3 4
    
    예상 출력
    7
    
  2. 예제 2

    입력
    8 3 1
    
    예상 출력
    3