阅读背景:

Knight's Trip 马在无线大棋盘上跳到指定点最小步数问题

来源:互联网 

题目描述

Problem D: Knight's Trip

In chess, each move of a knight consists of moving by two squares horizontally and one square vertically, or by one square horizontally and two squares vertically. A knight making one move from location (0,0) of an infinite chess board would end up at one of the following eight locations: (1,2), (-1,2), (1,-2), (-1,-2), (2,1), (-2,1), (2,-1), (-2,-1).




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: