1. Preface
Cross-Test the second bomb--a search from Ymdragon. A lot of previous games, what Ctsc,hnoi and Noi and so on, some problems really bad spit groove ... The search out in the examination room was still so sick.
2. Match match
Source: Bzoj 3139/hnoi 2013
Link:
3, Game Chihuizhu games
Source: Bzoj 1501/noi 2005
Link:
4, restore restores
Source: Bzoj 3149/CTSC 2013
Link:
5, Board Square
Probably test instructions: give a n*m square, the existing k color. Some of the lattice is painted with some color, the remaining lattice coloring scheme number, to meet from the upper left corner of the box to the lower right corner of any path, have not passed the same color lattice.
Summary: At first there is a thought, that is, because only k color, from the upper left to the lower right corner, the distance must be (n+m-1), so k<n+m+1 of course no solution. Next, for each position, set its color to a, then the sub-matrix with that point as the lower-right corner and the sub-matrix with that point as the upper-left corner should not appear a, except its own position. It turns out that this is the right idea, but it's inefficient if you search directly.
[Puzzle + Summary]20151013 Search