-
Notifications
You must be signed in to change notification settings - Fork 0
/
Solution13460_2.java
56 lines (47 loc) · 1.16 KB
/
Solution13460_2.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
//BOJ :: 13460 备浇呕免(2)
//2019-03-22
public class Solution13460_2 {
static int N, M, min;
static char[][] map;
static int[] dy = { -1, 1, 0, 0 };
static int[] dx = { 0, 0, -1, 1 }; // 惑窍谅快
static class pairs {
int ry,rx,by,bx;
public pairs(int ry, int rx, int by, int bx) {
super();
this.ry = ry;
this.rx = rx;
this.by = by;
this.bx = bx;
}
}
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine(), " ");
N = Integer.parseInt(st.nextToken()); // 技肺
M = Integer.parseInt(st.nextToken()); // 啊肺
map = new char[N][M];
int ry = -1, rx = -1, by = -1, bx = -1;
for (int i = 0; i < N; i++) {
String str = br.readLine();
for (int j = 0; j < M; j++) {
map[i][j] = str.charAt(j);
if (map[i][j] == 'R') {
ry = i;
rx = j;
}
if (map[i][j] == 'B') {
by = i;
bx = j;
}
}
}
/// input
}
public static void bfs() {
}
}