Master Zhu and Polygons
시간 제한1초메모리 제한512 MB
정N각형(N은 홀수)의 꼭짓점 M개를 골라 만든 볼록 다각형 중 내각이 정확히 K개 예각인 것의 개수를 10^9+7로 나눈 나머지를 구한다.
문제
Consider a regular polygon with vertices, where is odd. The vertices are numbered from to in circular order. We can select of these vertices to form a convex polygon on them. Master Zhu wants you to find how many of such possible convex polygons have exactly acute angles. As their number can be very large, find the answer modulo . Two polygons are considered different if the sets of numbers in their vertices differ.
입력
The first line of input contains one integer , the number of test cases ().
Each test case is described by a single line containing three integers , , and (, , , and is odd).
출력
For each test case, print the answer modulo on a separate line.