题意:求有多少个n*n矩阵满足下列条件
- Ai, j ∈ {0, 1, 2} for all 1 ≤ i, j ≤ n.
- Ai, j = Aj, i for all 1 ≤ i, j ≤ n.
- Ai, 1 + Ai, 2 + … + Ai, n = 2 for all 1 ≤ i ≤ n.
- A1, 1 = A2, 2 = … = An, n = 0.
解题思路:根据上面的条件我们会发现这个矩阵其实可以类比图的邻接矩阵。每个点的度为2相当于该点在一个环内。
小憩寒舍
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
1 | $ hexo new "My New Post" |
More info: Writing
1 | $ hexo server |
More info: Server
1 | $ hexo generate |
More info: Generating
1 | $ hexo deploy |
More info: Deployment