There is a 1000*1000 square cake. We use knife to cut the cake. The problem is after a series of cutting, how many partitions the cake will has.
Assumption:
The number of the cutting will be no more than 8.
After the cutting, the length of any edge of the partition will no less than 1.
The vertex coordinates of the cake are (0,0)(0,1000)(1000,1000)(1000,0).
The intersections of the cut line and the cake edge are two.
The following Graph is a sample partition. The number of the partitions is 10.
