悬线法
有边界限制的最大子矩阵问题一般可以通过悬线法(玄线法)解决,即通过处理出每个节点可以向四周扩张的长度,来计算包含该节点的最大矩阵面积……
$$ \gcd(a,b) = \gcd (b,a \text{ mod } b) $$
$$ \begin{cases} ax_1 + by_1 = \gcd(a,b) \newline bx_2 + (a\text{ mod }b)y_2 = \gcd(b,a\text{ mod }b) \end{cases} \Rightarrow \begin{cases} x_1 = y_2 \newline y_1 = x_2- \lfloor\dfrac{a}{b}\rfloor \times y_2 \end{cases}$$
Update your browser to view this website correctly.&npsb;Update my browser now