This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass | |
from typing import Any | |
from sage.all import * | |
n = 4 | |
# A guillotine partition is a binary tree of horizontal and vertical cuts. | |
# In our problem each leaf node is a horizontal or vertical rectangle. | |
# For example, 3 vertical cuts and 4 vertical rectangles produce [ | | | ] |