Darkness I
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Description
Princess Celestia, is an Alicorn pony, the former co-ruler of Equestria alongside her younger sister Princess Luna. Princess Celestia raises the sun and governs Equestria, while Princess Luna raises the moon and oversees the realm of dreams.
In early days, Luna felt overshadowed and ignored by the ponies of Equestria, who slept through her beautiful night sky. These negative emotions festered and eventually led her to be consumed by the darkness and power of the mythical creature known as Nightmare Moon.
The darkness was spreading, and could be transformed into the following model:
In an white 2D grid, there are several black grid points.
Every second, all white points that are 4-neighbors of at least two black points will turn black.
What is the minimum number of black points needed to turn the entire grid black in the end?
Format
Input
The first line contains two integers, and , representing the size of the grid
Output
Output a single integer representing the minimum number of black points needed.
Samples
2 2
2
Limitation
1s, 1024KiB for each test case.
2026 SYNU 五月周赛 Round I (Div 3)
- 状态
- 已结束
- 规则
- XCPC
- 题目
- 4
- 开始于
- 2026-5-7 19:30
- 结束于
- 2026-5-7 21:00
- 持续时间
- 1.5 小时
- 主持人
- 参赛人数
- 14