Horizontal lines

Your task is to write a program that computes the number of horizontal
lines contained in a given rectangle of characters. We consider that an
horizontal line is a sequence of two or more dashes consecutive
horizontally.

Input

The input starts with two naturals n ≥ 1 and m ≥ 1, followed by n lines,
each one with m characters. All the characters are dashes and lowercase
letters.

Output

Your program must print the number of horizontal lines contained in the
given rectangle.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:46:42.481Z

© Jutge.org, 2006–2026.
https://jutge.org
