码迷,mamicode.com
首页 >  
搜索关键字:black    ( 2607个结果
The Black Hole of Numbers (strtoint+inttostr+sort)
For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decre...
分类:其他好文   时间:2015-01-20 08:58:38    阅读次数:231
C++向控制台输出带颜色的字体
#include using namespace std; #define RESET "\033[0m" #define BLACK "\033[30m" /* Black */ #define RED "\033[31m" /* Red */ #define GREEN "\033[32m" /* Green */ #define YELLOW "\033[33m" /*...
分类:编程语言   时间:2015-01-19 11:01:13    阅读次数:239
js分页页码
使用AJAX分页 table{ margin:80px 600px; } td{ width:50px; height:auto} div{ width:50px; height:30px; border:1px solid Black; background-color:lavender; line-height:30px ; t...
分类:Web程序   时间:2015-01-19 00:15:02    阅读次数:266
hdu 5113 Black And White
http://acm.hdu.edu.cn/showproblem.php?pid=5113题意:给你n*m的格子,然后在每个格子内涂色,相邻格子不能同色,然后给你每个颜色涂的格子的固定个数,然后可不可以实现,可以实现输出任意一种,否则输出NO思路:dfs枚举,剪纸,每种颜色剩余的个数不能超过剩余格...
分类:其他好文   时间:2015-01-18 18:29:54    阅读次数:282
DFS入门之一
深度优先搜索实现较为简单,需要控制两个因素:1.已经访问过的元素不能再访问,在实际题目中还要加上不能访问的元素(障碍)2.越界这种情况是不允许的以杭电的1312 Red and Black 为例, 这是一道典型的DFS题目传送门:http://acm.hdu.edu.cn/showproblem.p...
分类:其他好文   时间:2015-01-18 11:41:30    阅读次数:151
HDU 5113 Black And White(暴力dfs+减枝)
题目大意:给你一个n×m的矩阵,然后给你k种颜色,每种颜色有x种,所有的个数加起来恰好为n×m个。问你让你对这个矩阵进行染色问你,能不能把所有的小方格都染色,而且相邻两个颜色不同。 思路:一开始想的是构造,先按照个数进行排序,枚举每一个位置,贪心的策略先放多的,如果可以全部放下就输出YES,以及存贮的方案,否则输出NO,但是有bug,一直不对。。。 正解:dfs暴力枚举每一个点,裸的话需要25...
分类:其他好文   时间:2015-01-17 19:35:01    阅读次数:261
UVa 132 Another Chocolate Maniac(状压DP)
UVa 132 Another Chocolate Maniac(状压DP)—— black 的专栏 —— waShaXiu...
分类:其他好文   时间:2015-01-15 16:08:01    阅读次数:195
poj 2411 Mondriaan's Dream(状压DP)
poj 2411 Mondriaan's Dream(状压DP)—— black 的专栏 —— waShaXiu...
分类:其他好文   时间:2015-01-14 23:00:02    阅读次数:383
css三角形
span.triangle { width: 0; height: 0; display: inline-block; border-top: 50px solid #e50303; border-right: 50px solid black;}
分类:Web程序   时间:2015-01-14 19:40:40    阅读次数:184
SGU 143 Long Live the Queen (树形DP)
SGU 143 Long Live the Queen (树形DP)—— black 的专栏 —— waShaXiu...
分类:其他好文   时间:2015-01-14 14:24:16    阅读次数:150
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!