• 欢迎光临~

# ATC ** 练习

### AGC056A

statement 给定一个 \$n (n ge 6)\$，构造一个 \$ntimes n\$ 的矩阵，由 `.` 和 `#` 组成，这个矩阵满足：
• 每行每列都有且仅有 (3)`#`
• 定义两个 `#` 在上下左右四个方向相连则为连通，若 (a)(b) 连通，(b)(c) 连通，那么 (a)(c) 也连通。满足这个矩阵中由 `#` 连通组成的连通块数量恰好为 (n)
solution 由于要满足行和列两个方向的信息，所以考虑按对角线对称构造，然后通过不停的奋斗，搞出了这种东西。
``````##.#......
###.......
.#.##.....
#.#..#....
..#..##...
...##..#..
....#..##.
.....##..#
......#.##
.......###
``````

``````##.#.......
###........
.#.##......
#.#..#.....
..#..##....
...##..#...
....#..##..
.....##.#..
......#..##
.......#.##
........###
``````

``````###......
...###...
......###
###......
...###...
......###
###......
...###...
......###
``````

``````          3
###.......
...###....
......###.
###.......
...###....
......###.
###.......
...###....
......###.
3..........
``````

``````###.......
...###....
......###.
##.......#
...##....#
.......###
###.......
...###....
......###.
..#..##...
``````

``````       11
###.....
...###..
1......##
###.....
...###..
1......##
###.....
...###..
``````

``````#.
.#
``````

``````.#
#.
``````

``````###.....
...##.#.
.....###
###.....
...##.#.
.....###
###.....
...###..
``````