Microcircuits

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

요약
원 위에 놓인 n개의 접점 사이에 서로 교차하지 않는 현 k개를 그리는 경우의 수를 센다.
난이도

보통10점 중 7점

유형
동적 계획법, 조합론, 수학, 재귀
정답자
아직 제출이 없습니다

문제

You probably know how microcircuits look like. First of all it is important to pay special attention to connections. Contacts on the circuit are connected by lines. If two lines do not intersect then there is no connection between respective contacts.

You are holding a circular circuit with nn contacts around the borderline. You have to calculate the number of possibilities to put exactly kk non-intersecting lines each connecting two contacts.

입력

Single line contains two integers nn and kk (1≤k≤n≤401 \le k \le n \le 40).

출력

Output the required number.

예제2

  1. 예제 1

    입력
    4 2
    
    예상 출력
    2
    
  2. 예제 2

    입력
    4 3
    
    예상 출력
    0