Emacs
의견: 0
While playing in his favourite text editor, Daniel decided to draw a picture that was \(N\) characters high and
\(M\) characters wide. The picture consists solely of characters ’.’ and ’’ such that characters ’’ form
some n\(on-ov\)erlapping rectangles. The rectangles don’t even touch each other on their sides or corners.
Help Daniel count the number of rectangles drawn on the picture.
In the test cases worth a total of 10 points, all rectangles will consist of a single ’*’ character.
In the test cases worth additional 15 points, it will hold \(N = 1\).
The first line contains two integers \(N\) and \(M\) (\(1 \le N\), \(M \le 100\)) from task description.
Each of the next \(N\) lines contains \(M\) characters ’.’ or ’*’ which represent the picture that Daniel drew.
In a single line you should output the number of rectangles on the picture.
6 7
***....
***..**
.....**
.***.**
.***...
.***...33 3
*.*
...
*.*41 10
.*.**.***.3평가 및 의견
Emacs
Log in to rate problems.
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Emacs