Output #1
2 4 3 4 2
2 2 1
1 1
1 1 1
5 9 13 14 15 17 18 19 19 20 20 19 19 18 17 16 14 12 9 5
This input contains five test cases.
* For the first test case, there are $11$ possible ways to fill the cells as follows:
* $(1,4,3,2,5)$
* $(1,4,3,5,2)$
* $(1,4,5,3,2)$
* $(4,1,3,2,5)$
* $(4,1,3,5,2)$
* $(4,1,5,3,2)$
* $(4,3,1,2,5)$
* $(4,3,1,5,2)$
* $(4,3,5,1,2)$
* $(4,5,1,3,2)$
* $(4,5,3,1,2)$
* From this, each value of $C_i$ is determined as follows:
* The integers that can be written in the $1$\-st cell from the left are $1,4$, which is two integers.
* The integers that can be written in the $2$\-nd cell from the left are $1,3,4,5$, which is four integers.
* The integers that can be written in the $3$\-rd cell from the left are $1,3,5$, which is three integers.
* The integers that can be written in the $4$\-th cell from the left are $1,2,3,5$, which is four integers.
* The integers that can be written in the $5$\-th cell from the left are $2,5$, which is two integers.
* For the second test case, there are two possible ways to fill the cells as follows:
* $(1,3,2)$
* $(3,1,2)$
* For the third test case, there is one possible way to fill the cells as follows:
* $(2,1)$
* For the fourth test case, there is one possible way to fill the cells as follows:
* $(1,2,3)$