码迷,mamicode.com
首页 >  
搜索关键字:chess    ( 440个结果
Codeforces Round #294 (Div. 2)
A. A and B and Chess题意:给出8*8的棋盘,大写的字母代表白方,小写的字母代表黑方,比较两方分别的权值多少 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 char s...
分类:其他好文   时间:2015-03-02 22:14:14    阅读次数:192
棋盘覆盖问题
在一个2^k×2^k (k≥0)个方格组成的棋盘中,恰有一个方格与其他方格不同,称该方格为特殊方格。显然,特殊方格在棋盘中可能出现的位置有4^k种,因而有4^k种不同的棋盘,图4.10(a)所示是k=2时16种棋盘中的一个。棋盘覆盖问题(chess cover problem)要求用图4.10(b)所示的4种不同形状的L型骨牌覆盖给定棋盘上除特殊方格以外的所有方格,且任何2个L型骨牌不得重叠覆盖。...
分类:其他好文   时间:2015-03-02 19:06:09    阅读次数:113
CodeForces Round #294 Div.2
这个题目感觉略简单,但是后两题还是一个没做出来╮(╯_╰)╭A. A and B and Chess就是比较一下棋盘上两边的权重。 1 #include 2 using namespace std; 3 4 const int maxn = 10; 5 6 char s[maxn][maxn]...
分类:其他好文   时间:2015-03-01 21:00:04    阅读次数:188
Codeforces Beta Round #7 A. Kalevitch and Chess
题目大意给出一个8*8的矩阵包含黑白色块,问最少操作几次可以恢复白色。解题思路水题,记录下行和列黑块的个数,进行操作即可。...
分类:其他好文   时间:2015-03-01 14:29:51    阅读次数:137
hdu 1524 A Chess Game 博弈之,SG函数简单题
Problem Description Let's design a new chess game. There are N positions to hold M chesses in this game. Multiple chesses can be located in the same position. The positions are constituted as a topological graph, i.e. there are directed edges connecting so...
分类:其他好文   时间:2015-03-01 13:14:04    阅读次数:294
1515: Play whit bear kid 模拟题——(逻辑关系要注意)
题目描述 Happy Spring Festival everyone! Many relatives will visit your house, of course they have bear kids. Now you are playing chess with a bear kid. It's really terrible. You have a 3*3 chessboard...
分类:其他好文   时间:2015-02-28 21:41:43    阅读次数:232
HDU 4405 Aeroplane chess 概率dp
题意:玩飞行棋,棋盘有0~n共n+1,每次抛一个6面的骰子,若得到x(1= n时,游戏结束。求抛骰子次数的期望。 解释概率dp加上一个限制条件,说下为什么当有飞机的时候前面的等于后面的,因为dp代表的是当前位置到n的期望, 所以前面的概率等于飞机到达的 转载: 又一道期望DP,其实这题与hdu4576那道概率DP很像(这道我也写了题解)。那么这两道一道求概率,...
分类:其他好文   时间:2015-02-27 06:41:56    阅读次数:124
八皇后问题递归代码
听了下别人的讲解后,最后仔细理解了下所谓的八皇后问题。 怎么说呢,感觉有点像搜索的做法。 #include int count=0; //row行,j列; int notDanger(int row,int j,int (*chess)[8]){ int i,k,flag1=0,flag2=0,flag3=0,flag4=0,flag5=0; //注意这里row与j不能直接使用; ...
分类:其他好文   时间:2015-02-25 17:10:10    阅读次数:147
hdu 4405 Aeroplane chess 动态规划
所谓概率DP大多是算期望 算期望大多是从终点往回推
分类:其他好文   时间:2015-02-17 12:47:44    阅读次数:122
八皇后问题
八皇后问题八皇后问题#include const int N = 8;int count;int notdanger(int row, int c, int (*chess)[N]) {// i 和 j 是 行列下标,一直扫 // 列 for (int i = 0; i = 0 && j >= 0;...
分类:其他好文   时间:2015-02-13 23:35:39    阅读次数:260
440条   上一页 1 ... 31 32 33 34 35 ... 44 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!