Fighting the Landlords 大意: 斗地主。。。。 分别给出两把手牌,肯定都合法。每张牌大小顺序是Y (i.e. colored Joker) > X (i.e. Black & White Joker) > 2 > A (Ace) > K (King) > Q (Queen) > ...
分类:
其他好文 时间:
2017-05-05 10:43:21
阅读次数:
191
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 ...
分类:
其他好文 时间:
2017-05-05 01:08:26
阅读次数:
179
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 ...
分类:
其他好文 时间:
2017-05-03 22:53:44
阅读次数:
251
//从0到n有n+1个格子 //对于格子i,掷一次骰子的数为x。那么能够从位置i到位置i+x //格子之间有连线,假设格子a和b有连线,那么从a到b不用掷骰子 //求从0到n的骰子掷的次数的期望 //dp[i] = 1/6*segma(dp[k]) + 1 (i<=k<=i+6) #include< ...
分类:
其他好文 时间:
2017-04-29 22:18:25
阅读次数:
159
题目:uva10401Injured Queen Problem(递推) 题目大意:依然是在棋盘上放皇后的问题,这些皇后是受伤的皇后,攻击范围缩小了。攻击范围在图中用阴影表示(题目)。然后给出棋盘的现状,???3?4:在一个6*6的棋盘上,由于皇后是能够列向攻击的,所以一列仅仅能放一个皇后,所以第一 ...
分类:
其他好文 时间:
2017-04-25 13:20:13
阅读次数:
169
#include<iostream>#include<string.h>#include<algorithm>using namespace std;int queen[10] = {0}; bool place(int k){ for(int i=0;i<k;i++){ if(queen[k]== ...
分类:
其他好文 时间:
2017-04-24 10:14:56
阅读次数:
136
题目的意思是有n个格子,掷色子的掷出的数目就是你一次到移动格数。其中有m个飞行通道可以让你直接从第xi格飞到第yi格。问你走到终点的期望是多少。 http://www.cnblogs.com/jackge/archive/2013/05/21/3091924.html 期望求解步骤理解 :http: ...
分类:
其他好文 时间:
2017-04-13 20:58:54
阅读次数:
165
Hzz loves aeroplane chess very much. The chess map contains N+1 grids labeled from 0 to N. Hzz starts at grid 0. For each step he throws a dice(a dice ...
分类:
其他好文 时间:
2017-04-12 20:51:57
阅读次数:
283
题目链接 [Ahoi2009]chess 中国象棋 设f[i][j][k]为前i行,j列放了1个棋子,k列放了2个棋子的方案数 分6种情况讨论,依次状态转移。 ...
分类:
其他好文 时间:
2017-04-12 03:58:21
阅读次数:
178
#include #include using namespace std; int queenpos[100];//设置数组存放每一行皇后的位置,下标是行数-1,值是列数 int n;//n皇后问题 void queen(int k)//皇后N问题 { if(k==n) { for(int i=0... ...
分类:
其他好文 时间:
2017-04-08 22:44:22
阅读次数:
227