Problem Statement | |||||||||||||
Consider an a by b rectangle, composed of a*b unit squares. Your task is to count the number of ways in which this rectangle can be divided into two contiguous sections, each consisting of 1 or more unit squares. Each section must contain at least 1 square on the edge of the rectangle. A section is contiguous if each square in the section is connected to each other square in the section via a path of horizontally or vertically adjacent squares that are all within the section. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | a will be between 1 and 6, inclusive. | ||||||||||||
- | b will be between 2 and 6, inclusive. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
|