And God said, "The waters are to teem with teeming animal spirit; and fliers will fly over the land, upon the dome of the sky."
And God created the big sea dragons, and all the kinds of crawling beings which teemed in the water, and every winged flier to its kind, and God saw that it was good.
And God blessed them, saying: "Bear fruit and multiply, and fill the water in the seas, and birds will multiply on the land."
And it was evening, and it was morning: a fifth day.
生命游戏中, 你将出生在一个 n×m 大小的开放世界网格中, 每个网格都有一个细胞, 有存活和死亡两种状态。
虽然是开放世界,试图访问超出这 n×m 部分的网格会被提示:“前面的区域,以后再来探索吧!” 你猜为什么有Special Judge?
每经过一个时间单位, 这些细胞的状态将根据其周围的八个网格中细胞的情况, 按如下规则发生变化:
- 孤独: 若存活的细胞周围的存活细胞数量小于2个, 该细胞死亡.
- 适中: 若存活的细胞周围存活的细胞数量为2个或3个, 该细胞不会死亡.
- 过载: 若存活的细胞周围存活的细胞数量大于3个,该细胞死亡.
- 繁衍: 若死亡的细胞周围存活的细胞数量恰好为3个,该细胞复活(变为存活状态)。
某一时刻的某个细胞的存活状态,只和上一时刻有关。
现给出初始细胞存活状态, 请你输出 T 单位时间后的细胞状态.