-->
当前位置:首页 > 题库

PROGRAMMING:Search Search

Luz5年前 (2021-05-10)题库427
Keven got a map of several islands by secret method, so Keven decided to explore the island. His plane would land at the point (PX, py). Now he wants to know the area of the island he landed on. Can you help him?
The numbers in the figure represent the altitude, 0 represents the ocean, and 1-9 represent land. Note that if a point here is land, and one of the points above, below, left and right is land, then we think that this point and the other point are the same island. Each unit represents an area of 1
###Input format:
Enter four positive integers n and m, PX and py in the first line, indicating that the size of the map is n × M (the abscissa and ordinate count from 1), the landing point of Keven is (PX, py), and N lines below, each line gives m numbers.
###Output format:
Output the area of the island directly in a row.
###Input sample 1:
```in
3 3 1 1
five hundred
022
031
```
###Output sample 1:
```out
one
```
###Input sample 2:
```in
3 3 1 1
five hundred and twenty-seven
002
031
```
###Output sample 2:
```out
six
```







answer:If there is no answer, please comment