Codeforces Round #249 (Div. 2)E(构造)

Note

The answer to the first sample is shown on the picture (1 — green color, 2 — blue, 3 — dark blue, 4 — pink).

In the second sample there exists 4! answers, each of them is considered correct.

In the third sample two vertices with equal colors are connected. So the correct vertex coloring couldn’t be obtained.

题解:构造题

考虑这样一种构造:12121

34343

21212

43434

不难发现每行都只有两种数,且交叉出现,且相邻两行之间的数不同

也可以这样对每列构造,做法已显然,,对行或对列枚举这四个数字的位置即可

有多远,走多远,把足迹连成生命线。

Codeforces Round #249 (Div. 2)E(构造)

相关文章:

你感兴趣的文章:

标签云: