猪猪岛屿
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
猪猪岛屿
时间限制:
空间限制:
题目背景
是猪猪皇帝,他有好多座岛屿
题目描述
在猪猪海有好多座岛屿,有天想知道他所有的岛屿的海岸线(周长和),在猪猪海上发射了一颗卫星,侦测出了猪猪海地图。其中猪猪海可以看作是一个的平面,岛屿用来表示,海用来表示。但觉得数数很麻烦,于是向你发出了求助信号
输入描述
第一行两个整数,n和m
第二行到n+1行,每行m个0/1整数
输出描述
一个整数表示海岸线长度
样例输入
4 4
1 0 1 1
0 1 1 0
0 0 1 0
1 0 1 1
样例输出
24
数据范围
7.7NOIP训练
- Status
- Done
- Rule
- OI
- Problem
- 4
- Start at
- 2024-7-7 8:30
- End at
- 2024-7-7 12:00
- Duration
- 3.5 hour(s)
- Host
- Partic.
- 8