码迷,mamicode.com
首页 >  
搜索关键字:chess    ( 440个结果
HDU 4403(Aeroplane chess ,求期望,概率DP)
题目大意: 飞行棋。给一组数据 N,M ,N代表有N+1(一维,0->N)个格子,你的起始点是在0号位置,M代表你有M条航班,接下来会有M行,每行两个整数X,Y,表示在位置X和位置Y有一条航班,可以直接从X飞到Y,投掷一枚骰子,投掷多少就能走多少步,如遇到航班,则按照航班走,航班可以连续,每个航班的起始点不同。输出投掷色子次数的期望。 解题思路: dp [ n ]=0,dp [ i ]=sum( dp [i+j] ) +1, j 从1累加到6,因为期望代表的是步数,所以每次加 1 步,当遇到航班 (...
分类:其他好文   时间:2014-09-04 17:11:09    阅读次数:269
UVa 11538 Chess Queen
在n × m 的棋盘上放两个互相攻击的皇后,问有多少种方法这道题重点不在于编程,而是数学公式的推导。其中还用到了Σ(i2)的公式,看来我高中数学没白学,嘎嘎至于推导过程,看大白书吧,嘿嘿。对了,书中有一步貌似有个小错误,不过不影响结果 1 //#define LOCAL 2 #include 3 ....
分类:其他好文   时间:2014-08-27 09:17:37    阅读次数:204
UVA - 10237 Bishops
A bishop is a piece used in thegame of chess which is played on a board of square grids. A bishop can only movediagonally from its current position and two bishops attack each other if oneis on the pa...
分类:其他好文   时间:2014-08-23 15:26:31    阅读次数:286
Cracking the Coding Interview 6.2
There is an 8*8 chess board in which two diagnolly opposite corners have been cut off. You are given 31 dominos, and a single domino can cover exactly...
分类:其他好文   时间:2014-08-20 12:01:32    阅读次数:236
Berserk Rook
Berserk RookAs you may know,chessis an ancient game for which almost everyone has at least a basic understanding of the rules. Chess is a two-player s...
分类:其他好文   时间:2014-08-18 15:45:02    阅读次数:179
poj 1915 Knight Moves (bfs搜索)
Knight Moves Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 21919   Accepted: 10223 Description Background  Mr Somurolov, fabulous chess-gamer indeed, asse...
分类:其他好文   时间:2014-08-14 14:08:59    阅读次数:229
HDU 4832 Chess
同样是百度之星的题目。刚开始看题目,觉得这是一道搜索的题,于是就萌生了找题解的想法。一开始就没有斗志,当然不会做出这道题的啦。可是看完题解恍然大悟,原来是DP,而且很简单的一道DP。再一次失败,说明了看题解真的不是一个好习惯。我要改! 我要改!!其实基本的思想就是把这个二维移动分开,变成一维的移动,...
分类:其他好文   时间:2014-08-08 15:39:16    阅读次数:208
HDU 1087 Super Jumping! Jumping! Jumping! 最大子序列的和
Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to yo...
分类:其他好文   时间:2014-08-04 17:50:47    阅读次数:158
hdu 3345 War Chess (bfs+优先队列)
War Chess Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1732    Accepted Submission(s): 416 Problem Description War chess is hh's...
分类:其他好文   时间:2014-08-02 20:58:34    阅读次数:442
hdu 4405 Aeroplane chess
题意:hzz一开始在0位置,然后hzz掷骰子,骰子为i,就往前走i步,当hzz位置大于等于n的时候结束,求掷骰子次数的期望有m个直达点 (x,y),走到x时可以直接到y求期望一般从后往前推当 i不等于任何一个x时dp[i]=seg(1/6*dp[i+k])+1否则dp[i]=dp[y] 1 #inc...
分类:其他好文   时间:2014-07-31 23:24:30    阅读次数:159
440条   上一页 1 ... 38 39 40 41 42 ... 44 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!