문제
Problem 3: Cow Art [Brian Dean, 2014]
RRRBB
GGBBB
BBBRR
BBRRR
RRRRR
입력
* Line 1: The integer N.
* Lines 2..1+N: Each line contains a string with N characters, describing one row of a painting.
출력
* Line 1: Two space-separated integers, telling the number of regions in the painting when viewed by a human and by a cow.
예제1
입력
5
RRRBB
GGBBB
BBBRR
BBRRR
RRRRR
출력
4
3출처
USACO 2014 March Bronze