#include<bits/stdc++.h>
using namespace std;
int main(){
char a[10][10];
int i, j;
for(i = 0; i < 10; i++){
for(j = 0; j < 10; j++){
cin >> a[i][j];
}
}
int bx, by, lx, ly;
for(i = 0; i < 10; i++){
for(j = 0; j < 10; j++){
if(a[i][j] == 'B'){
bx = i;
by = j;
}
if(a[i][j] == 'L'){
lx = i;
ly = j;
}
}
}
cout << (ly - by) + (lx - bx) - 1;
}
USACO 2019 US Open Contest, BronzeProblem 1. Bucket Brigade Answer For C++
最新推荐文章于 2024-10-31 19:07:52 发布