Pole Arrangement

There are poles of height 1,2,...,n in a row. If you look at these poles from the left side or the right side, smaller poles are hidden by taller poles. For example, consider the two arrangements of 4 poles in the next figure: For each arrangement, only one pole can be seen from the left, and two poles can be seen from the right. You are to write a program to calculate the number of arrangements of n poles such that seen from the left you see l poles and seen from the right you see r poles. Input Your program is to read from standard input. The input consists of T test cases. The number of test cases T is given in the first line of the input. Each test case consists of a line containing three integers, n,l,andr(1≤l,r≤n≤20),wherenisthenumberofpolesandl(resp. r)isthenumberofpoles that can be seen from the left (resp. right). Output Your program is to write to standard output. Print exactly one line for each test case. The line should contain the number of arrangements of poles for the test case. The following shows sample input and output for four test cases. Sample Input 4 412 411 524 20 2 1 Sample Output 2 0 4 6402373705728000