4
1 2 3 4
2 1
Tudor first combines the pieces of wood with lengths 11 and 44 to form a board of length 55.
Then he combines the pieces of wood with lengths 22 and 33 to form another board of length 55.
Finally, he combines the boards to make a fence with length 22 and height 55.
5 1 10 100 1000 2000
1 10
Tudor can't make a fence longer than length 11, and there are 1010 ways to make a fence with length 11 by choosing any two pieces of wood to nail together.
Specifically, he may have a fence of height 1111, 101101, 10011001, 20012001, 110110, 10101010, 20102010, 11001100, 21002100 and 30003000.