码迷,mamicode.com
首页 >  
搜索关键字:knight moves    ( 435个结果
Educational Codeforces Round 16
Problem A King Moves 题目大意 有一个国际象棋的棋盘,给定一个国王的位置,求其移动一步可到达的合法位置数量。 解题分析 国王的位置可以分为3类,每类的答案为8、5、3。 参考程序 1 #include <map> 2 #include <set> 3 #include <stac ...
分类:其他好文   时间:2016-08-29 13:02:55    阅读次数:207
【HDU 4898】 The Revenge of the Princess’ Knight (后缀数组+二分+贪心+...)
The Revenge of the Princess’ Knight Problem Description There is an old country and the king fell in love with a devil. The devil always asks the king ...
分类:编程语言   时间:2016-08-26 15:27:42    阅读次数:244
codeforces 710A King Moves(水)
output standard output The only king stands on the standard chess board. You are given his position in format "cd", where c is the column from 'a' to ...
分类:其他好文   时间:2016-08-26 13:45:46    阅读次数:124
codeforces 710A A. King Moves(水题)
题目链接: A. King Moves 题意: 给出king的位置,问有几个可移动的位置; 思路: 水题,没有思路; AC代码: ...
分类:其他好文   时间:2016-08-23 23:34:28    阅读次数:177
Educational Codeforces Round 16---部分题解
710A. King Moves 给你图中一点求出它周围有几个可达的点; 除边界之外都是8个,边界处理一下即可; #include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #incl ...
分类:其他好文   时间:2016-08-23 11:37:13    阅读次数:337
CodeForce 710A King Moves
King Moves King Moves The only king stands on the standard chess board. You are given his position in format "cd", where c is the column from 'a' to ' ...
分类:其他好文   时间:2016-08-23 10:11:12    阅读次数:208
【模拟】Codeforces 710A King Moves
题目链接: http://codeforces.com/problemset/problem/710/A 题目大意: 国际象棋标准8X8棋盘,国王能往周围8个方向走。输入国王的位置,输出当前国王能往几个方向走。 题目思路: 【模拟】 签到题(看错题目WA了一次)。边界处理下就好。 1 // 2 // ...
分类:其他好文   时间:2016-08-23 01:35:33    阅读次数:186
CodeForces 710A King Moves (水题)
题意:给定一个坐标,问你皇后有几个方向可以走。 析:直接格举那八个方向即可。 代码如下: ...
分类:其他好文   时间:2016-08-23 01:12:49    阅读次数:145
骑士游历/knight tour - visual basic 解决
在visual baisc 6 how to program 中文版第七章的练习题上看到了这个问题,骑士游历的问题。 在8x8的国际象棋的棋盘上,骑士(走法:一个方向走两格,另一个方向一格)不重复走完棋盘上所有空格的路径。 思路就是选角落的一格为起点,把所有能走的路全部路径全部试一遍。要试8^63次... ...
分类:其他好文   时间:2016-08-13 19:26:28    阅读次数:157
POJ 2000 Gold Coins
题目链接: http://poj.org/problem?id=2000 Description The king pays his loyal knight in gold coins. On the first day of his service, the knight receives on ...
分类:其他好文   时间:2016-08-08 20:54:46    阅读次数:144
435条   上一页 1 ... 21 22 23 24 25 ... 44 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!