CF2048E

二分图,左部 2N2N 个点,右部 MM 个点。能否用至多 NN 种颜色为 2MN2MN 条边着色,满足图中没有单色环。

每种颜色构成一个森林,边数最多 2N+M12N+M-1

Problem - 2094F - Codeforces(shift)

Problem - 2101A - Codeforces(蛇形)

【12E】构造 N×NN\times N 的矩阵(NN 为偶数),只能使用 NN 种不同的数字,且满足任一行(列)的数字互不相同,主对角线都是 0,且整体关于主对角线对称。

Trulicina gives you integers nn, mm, and kk. It is guaranteed that k2k\geq 2 and nm0(modk)n\cdot m\equiv 0 \pmod{k}.

Output a nn by mm grid of integers such that each of the following criteria hold:

  • Each integer in the grid is between 11 and kk, inclusive.
  • Each integer from 11 to kk appears an equal number of times.
  • No two cells that share an edge have the same integer.

It can be shown that such a grid always exists. If there are multiple solutions, output any.

1628C. Grid Xor

1×31\times32×22\times 2

1
2
3
4
5
6
.*#.*.
*.*.*#
#*.*.*
*.*#*.
.*.*.*
*#*.*#
1
2
3
4
5
6
7
8
.*#.*.*#
*.*.*.*.
#*.*#*.*
*.*.*.*#
.*#.*.*.
*.*.*#*.
#*.*.*.*
*.*#*.*#