Skip to content

Commit ec22361

Browse files
committed
Update ShortestPathOfTheKing.md
1 parent 9620c28 commit ec22361

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Problems/ShortestPathOfTheKing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ The king is left alone on the chessboard. In spite of this loneliness, he doesn'
88

99
In one move the king can get to the square that has a common side or a common vertex with the square the king is currently in (generally there are 8 different squares he can move to).
1010

11-
## 输入格式
11+
## Input format
1212

1313
The first line contains the chessboard coordinates of square \( s \) , the second line — of square \( t \) .
1414

1515
Chessboard coordinates consist of two characters, the first one is a lowercase Latin letter (from a to h), the second one is a digit from 1 to 8.
1616

17-
## 输出格式
17+
## Output format
1818

1919
In the first line print \( n \) — minimum number of the king's moves. Then in \( n \) lines print the moves themselves. Each move is described with one of the 8: L, R, U, D, LU, LD, RU or RD.
2020

2121
L, R, U, D stand respectively for moves left, right, up and down (according to the picture), and 2-letter combinations stand for diagonal moves. If the answer is not unique, print any of them.
2222

23-
## 样例 #1
23+
## Sample input and output
2424

25-
### 样例输入 #1
25+
### Input
2626

2727
```in
2828
a8
2929
h1
3030
```
3131

32-
### 样例输出 #1
32+
### Output
3333

3434
```out
3535
7

0 commit comments

Comments
 (0)