码迷,mamicode.com
首页 >  
搜索关键字:记忆化    ( 1420个结果
数位DP合集
1.HDU 4722 good numbers: 题意:给出一个区间【A,B】,求出区间内有多少个数的各位的和加起来模10等于0的数有多少个。 解法:这是一个数位DP简单入门题,简单的DFS+数组记忆化搜索就可以。姿势是自己写的。。感觉略搓,做到第三个数位DP题的时候看到了别人的姿势,学习了。 代码: #include #include #include #include #inc...
分类:其他好文   时间:2015-04-24 09:09:23    阅读次数:165
UVALive - 6800 The Mountain of Gold?(Bellman-ford找负权回路,dfs)
题目链接 https://icpcarchive.ecs.baylor.edu/external/68/6800.pdf bellman-ford照模板打了一段,能够找到负权回路,问题就是判断0点在不在负权回路中了,于是写了个记忆化dfs。 #include #include #include #include #include using namespace std; #de...
分类:其他好文   时间:2015-04-24 09:05:46    阅读次数:156
POJ 1351 Number of Locks (记忆化搜索 状态压缩)
POJ 1351 Number of Locks (记忆化搜索 状态压缩)...
分类:其他好文   时间:2015-04-23 23:30:17    阅读次数:183
HDU 1428 漫步校园(bfs + 记忆化搜索)
Problem Description: LL最近沉迷于AC不能自拔,每天寝室、机房两点一线。由于长时间坐在电脑边,缺乏运动。他决定充分利用每次从寝室到机房的时间,在校园里散散步。整个HDU校园呈方形布局,可划分为n*n个小方格,代表各个区域。例如LL居住的18号宿舍位于校园的西北角,即方格(1,1)代表的地方,而机房所在的第三实验楼处于东南端的(n,n)。因有多条路线可以选择,LL希望每次的散...
分类:其他好文   时间:2015-04-23 19:58:43    阅读次数:138
hdu4753 状态压缩dp博弈(记忆化搜索写法)
http://acm.hdu.edu.cn/showproblem.php?pid=4753 Problem Description    There is a 3 by 3 grid and each vertex is assigned a number.    It looks like JiuGongGe, but they are different, fo...
分类:其他好文   时间:2015-04-23 19:54:03    阅读次数:203
HDU 1331 Function Run Fun (基础记忆化搜索)
HDU 1331 Function Run Fun (基础记忆化搜索)...
分类:其他好文   时间:2015-04-23 17:41:01    阅读次数:173
HDU 1978 How many ways (基础记忆化搜索)
HDU 1978 How many ways (基础记忆化搜索)...
分类:其他好文   时间:2015-04-23 08:19:46    阅读次数:120
skiing---记忆化搜索
skiing 时间限制:3000 ms  |  内存限制:65535 KB 难度:5 描述Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子  1 2 3 ...
分类:其他好文   时间:2015-04-23 00:01:52    阅读次数:221
ZOJ 3640 Help Me Escape(概率dp+记忆化)
Background     If thou doest well, shalt thou not be accepted? and if thou doest not well, sin lieth at the door. And unto thee shall be his desire, and thou shalt rule over him.     And Cain ta...
分类:其他好文   时间:2015-04-22 09:41:23    阅读次数:199
uva 11008 Antimatter Ray Clearcutting(DFS + 记忆化搜索)
uva 11008 Antimatter Ray ClearcuttingIt’s year 2465, and you are the Chief Engineer for Glorified Lumberjacks Inc. on planet Trie. There is a number of trees that you need to cut down, and the only wea...
分类:其他好文   时间:2015-04-21 09:45:12    阅读次数:194
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!