Area of the room
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Find the area of the room in the square labyrinth.
Input
The first line contains the size n (3 ≤ n ≤ 10) of labyrinth. Each of the next n lines contains n characters describing the labyrinth (symbol ".
" denotes the empty cell, symbol "*
" denotes the wall). The last line contains two numbers - the row and column numbers for the cell that locates in the room which area should be found. It is guaranteed that this cell is empty and the labyrinth is surrounded by walls from all sides. The rows and columns of the labyrinth are numbered starting from one.
Output
Print the number of empty cells in a given room.
Examples
Input #1
Answer #1
Submissions 6K
Acceptance rate 55%