A. Treasure Island
Time limit: 2000 ms
Memory limit: 262144 kB
Pirate John Silver has found a map depicting exactly one island in a sea. The map is a piece of cloth divided into cells: n cells in height and m cells in width. John Silver knows that every cell denotes either land or water, but some of the cells are erased, and now it’s absolutely impossible to say what these cells represent.
Help John Silver to restore the map of the island. An island is a non-empty set of land cells connected in four directions (up, down, left and right).
继续阅读“2018 BUPT Summer Training #1 (恢复训练) 部分题解（仍会更新）”