제출: 3 통과: 3

[제출] [채점기록] [묻고답하기]

There are n 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.

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, and r (1 ≤ l,r ≤ n ≤ 20), where n is the number of poles and (resp. r) is the number of poles that can be seen from the left(resp. right).

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.

```
4
4 1 2
4 1 1
5 2 4
20 2 1
```

```
2
0
4
6402373705728000
```