기출 문제 / 삼성 2019 First Half Morning Problem 2

Life Sciences Lab Intern

Seungyong, who has started an internship at the Life Sciences Lab, is tasked with collecting moving mold on an n×m grid. The collection of mold on the grid follows these rules. In the image below, the numbers marked in red indicate the size of the mold, and the numbers marked in blue indicate the speed.