可以发现当 $n>2$ 时一定有解,且一定存在满足 $i\circ j\le 3$ 以及 $i\circ j=1\pod{i>3}$ 的解。
进一步地,一定存在满足下列条件的解:
- 第一行是 $1^a2^b3^c$ 的形式,且 $ab=0$。
- 第二行是 $1^d3^e1^f$ 的形式,且 $d\le 2$。
- 第三行是 $1^g3^h2^i$ 的形式。
满足条件的矩阵只有 $O(n^4)$ 种,每个矩阵的结合度可以 $O(1)$ 计算。故总时间复杂度 $O(n^4)$。
As we are currently experiencing an overwhelming number of web requests for fetching user submissions, we have temporarily disabled the full submissions list. You must now be logged in to view submissions.
Type: Editorial
Status: Open
Posted by: jiangly
Posted at: 2025-12-13 00:24:00
Last updated: 2025-12-13 00:24:03
可以发现当 $n>2$ 时一定有解,且一定存在满足 $i\circ j\le 3$ 以及 $i\circ j=1\pod{i>3}$ 的解。
进一步地,一定存在满足下列条件的解:
满足条件的矩阵只有 $O(n^4)$ 种,每个矩阵的结合度可以 $O(1)$ 计算。故总时间复杂度 $O(n^4)$。