Algorithm · OpenAI · Hard
A rectangular planting bed is handed to you as R strings of equal length C. Each character records one plant's visible condition: H for healthy, I for infected, R for recovered, and D for dead; no other characters appear at the start. Alongside the bed you are given three integers T, K, D and one integer N. The thresholds satisfy $$0 \le T \le K \le 4$$, D is a strictly positive delay length measured in days, and the run spans exactly N days. Part 1 — simulate the outbreak.…
Checking your access…