#P6184. [USACO08OCT] Building A Fence G
[USACO08OCT] Building A Fence G
Description
How many different cutting methods are there such that the four cut boards can form a four-sided fence.
Note:
- Do not consider symmetry. You do not need to remove symmetric cases or deal with other similar complicated issues.
- The area enclosed by the fence must be greater than .
- The result fits in a 32-bit integer.
Input Format
One integer .
Output Format
The number of ways Farmer John can split the board and make a quadrilateral.
6
6
Hint
Farmer John has ways to cut the board into four pieces:
- (1, 1, 1, 3);
- (1, 1, 2, 2);
- (1, 1, 3, 1);
- (1, 2, 1, 2);
- (1, 2, 2, 1);
- (1, 3, 1, 1);
- (2, 1, 1, 2);
- (2, 1, 2, 1);
- (2, 2, 1, 1);
- (3, 1, 1, 1)。
Among them, there are four cases that cannot form a quadrilateral:
- (1, 1, 1, 3),
- (1, 1, 3, 1),
- (1, 3, 1, 1),
- (3, 1, 1, 1)。
Translated by ChatGPT 5
京公网安备 11011102002149号