시간 제한 | 메모리 제한 | 제출 | 정답 | 맞은 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 256 MB | 14 | 9 | 8 | 66.667% |
Let N be a positive integer. Integers 1, 2, 3, ..., 2N are divided into three sets A, B and C. Write a program table, which calculates the number of ways to fill the table with two rows and N columns so that:
For example, if N = 4 , A = {2, 3} , B = {4, 7, 8} and C = {1, 5, 6} , then there are exactly two tables of required type.
On the first row of the standard input is given the integer N (1 < N ≤ 35). On the second row are given M – the number of integers of the set A , and integers of the set A (0 ≤ M ≤ N). On the third row are given K – the number of integers of the set B, and integers of the set B (0 ≤ K ≤ N).
The program should print on the standard output a single line holding the result.
4 2 3 2 3 4 8 7
2