Find Square
题意翻译
## 题目描述
一块矩形有n × m个白色格子,把其中的一些格子涂成黑色,形成一大块黑色的正方形格子,正方形的边长为奇数。找出这个正方形的中心点。
## 输入输出格式
### 输入格式:
第1行包括两个整数n , m( 1≤ _n_ , _m_ ≤ 115 )表示矩形的行和列。
接下来第2到n+1行,每行m个字符,s_i1_ , s_i2_ ... s_im_( s_ij_ 为 ‘ W ’ 时表示白色格子,为 ‘ B ’ 时表示黑色格子, _i_ 表示矩形第 _i_ 行)。
### 输出格式
输出包括两个整数r , c( 1 ≤ _r_ ≤ _n_ , 1 ≤ _c_ ≤ _m_ ),用空格隔开,表示正方形的中心点在矩形中的坐标。
题目描述
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.
输入输出格式
输入格式
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 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.
输入输出样例
输入样例 #1
5 6
WWBBBW
WWBBBW
WWBBBW
WWWWWW
WWWWWW
输出样例 #1
2 4
输入样例 #2
3 3
WWW
BWW
WWW
输出样例 #2
2 1