There is a room of size NxN. Rows and columns are numbered from 1 to N. Initially, M cells contain mold.
Each day, all mold spreads simultaneously. Mold at (x,y) disappears, and new mold appears in up to 8 cells reachable by a knight move, namely (x+1,y+2), (x+1,y−2), (x−1,y+2), (x−1,y−2), (x+2,y+1), (x+2,y−1), (x−2,y+1) and (x−2,y−1). Positions outside the room are lost. If several molds spread to the same cell, that cell contains mold.
Inspection happens exactly t days from today. If any of the K inspected cells contains mold, cleaning is required. Decide whether cleaning is required.