AIM Tech Round 5 (rated, Div. 1 + Div. 2)
A
Find Square
Codeforces
800
原题
←B →
翻译中…

Consider a table of size $n \times m$, initially fully white. Rows are numbered $1$ through $n$ from top to bottom, columns $1$ through $m$ from left to right. Some square inside the table with odd side length was painted black. Find the center of this square.

翻译中…

Input

翻译中…

The first line contains two integers $n$ and $m$ ($1 \le n, m \le 115$) — the number of rows and the number of columns in the table.

翻译中…

The $i$-th of the next $n$ lines contains a string of $m$ characters $s_{i1} s_{i2} \ldots s_{im}$ ($s_{ij}$ is 'W' for white cells and 'B' for black cells), describing the $i$-th row of the table.

翻译中…

Output

翻译中…

Output two integers $r$ and $c$ ($1 \le r \le n$, $1 \le c \le m$) separated by a space — the row and column numbers of the center of the black square.

翻译中…

样例

Input #1
5 6
WWBBBW
WWBBBW
WWBBBW
WWWWWW
WWWWWW
Output #1
2 4
InputCopy OutputCopy
Input #2
3 3
WWW
BWW
WWW
Output #2
2 1
InputCopy OutputCopy
题目信息
题号
1028A
时间限制
1 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。