1496 : 樱桃炸弹
时间限制Time Limit
1
秒Sec
内存限制Memory Limit
128
兆MB
提交次数Submitted
0 次Times
通过次数Solved
0 次Times
标准评测 Standard
从标准输入读入,结果写到标准输出。评测将输出拆成 token,与标准答案逐项比较,不按整段逐字节比对。
Read from standard input and write to standard output. The judge splits the output into tokens and compares them with the official answer; it does not compare raw bytes.
| 比对Compare | token 相同即通过。中间的空格、制表符、换行可多可少。Matching tokens pass. Extra spaces, tabs, or newlines between them are ignored. |
|---|---|
| 不同则错Differs | token 个数或内容不同即错误。23 与 2 3、02 与 2、2.0 与 2 均视为不同。A different token count or value is wrong. 23 vs 2 3, 02 vs 2, and 2.0 vs 2 all differ. |
| 输入Input | 标准输入,格式见题面。Standard input; format as in the statement. |
| 输出Output | 标准输出。Standard output. |
题目描述Description

Blover的后院是一块5行9列的草坪(视作网格),如今草坪上的植物已经啃噬殆尽,僵尸占领了草坪,Blover的大脑岌岌可危。
见势不妙的Blover充值了648,于是暂时得到了这样的Buff——无缓冲时间的樱桃炸弹。
使用一次樱桃炸弹,能够立即消灭一片3*3区域内的僵尸。
但是Blover的阳光同样所剩无几,它希望尽可能地节约阳光。Blover想知道它至少需要几枚樱桃炸弹,才能清除掉所有的僵尸。
输入格式Input
输入共5行,每行共9列,其中第 i 行的第 j 列为一个整数 x , x\in\{0, 1\}。若 x 为1,代表草坪上的第行 i 第 j 列位置存在僵尸,为0则代表空位置。
输出格式Output
一个整数,代表需要消耗樱桃炸弹的最小数量。