摘要: Problem A Rook, Bishop and King题目要求:在国际象棋棋盘上给你一个起始点一个终点。让你求车,象,国王从起始点到终点最短走的步数。做法很简单三个公式,具体看代码吧。代码如下: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 11 using namespace std;12 13 int x1, y1, x2, y2;14 15 inline int abs(int x){return x>0?x... 阅读全文
posted @ 2013-12-07 21:37 张小豪 阅读(227) 评论(0) 推荐(0) 编辑