#546. 跳马
跳马
当前没有测试数据。
Background
Special for beginners, ^_^
Description
Given two integers x and y, print the sum.
Format
Input
第一行两个整数N,M表示棋盘的大小,左上角为(1,1),右下角为(N,M),其中N和M都不超过8。 第二行两个整数X,Y表示马出发时的位置。
Output
N行,每行M个整数,为马跳到此格子时的步数(规定马的出发点这个值为0)。如果有多种解,输出任意一种即可。所有情况保证有解。(本题输入数据给定,输出的答案自已手工验正是否正确)
Samples
4 5
1 1
0 19 6 15 2
5 14 1 10 7
18 9 12 3 16
13 4 17 8 11
Limitation
1s, 1024KiB for each test case.