![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
动态规划
TLE分治的WA自动机
eli eli lama sabachthani
展开
-
UVA-12369 Cards 概率DP
题目DescriptionTaha has got a standard deck of cards with him. In additionto the 52 regular ones, there are 2 joker cards. Every regularcard has a rank and a suit. The ranks in ascending order are:A, 2, 3, 4, 5, 6, 7, 8, 9, T, J, Q and K. The suit of a原创 2020-09-17 20:36:30 · 143 阅读 · 0 评论 -
POJ-3245 Corn Fields 状压dp
题目链接:POJ-3245 Corn Fields题目DescriptionFarmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn for the ...原创 2019-08-01 21:06:08 · 207 阅读 · 0 评论 -
HDU 4405 Aeroplane chess 概率dp入门
题目链接:HDU 4405 Aeroplane chess题目Problem DescriptionHzz 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 d...原创 2019-07-28 17:36:00 · 95 阅读 · 0 评论 -
Codeforces 148D Bag of mice 简单概率dp
题目链接:Codeforces 148D Bag of mice题目DescriptionThe dragon and the princess are arguing about what to do on the New Year’s Eve. The dragon suggests flying to the mountains to watch fairies dancing in ...原创 2019-07-28 20:48:32 · 123 阅读 · 0 评论 -
BZOJ-1076 奖励关 概率+状压DP
题目链接:BZOJ-1076 奖励关题目Description你正在玩你最喜欢的电子游戏,并且刚刚进入一个奖励关。在这个奖励关里,系统将依次随机抛出k次宝物,每次你都可以选择吃或者不吃(必须在抛出下一个宝物之前做出选择,且现在决定不吃的宝物以后也不能再吃)。宝物一共有n种,系统每次抛出这n种宝物的概率都相同且相互独立。也就是说,即使前k-1次系统都抛出宝物1(这种情况是有可能出现的,...原创 2019-08-14 00:32:22 · 99 阅读 · 0 评论 -
HDU 6644 - 11 Dimensions 数位DP
题目链接:HDU 6644 - 11 Dimensions题目Problem Description11 Dimensions is a cute contestant being talented in math. One day, 11 Dimensions came across a problem but didn’t manage to solve it. Today you ar...原创 2019-08-10 19:57:33 · 223 阅读 · 0 评论 -
Robots 2019icpc南京网络赛 DAG概率DP
题目DescriptionGiven a directed graph with no loops which starts at node 1 and ends at node nn.There is a robot who starts at 1, and will go to one of adjacent nodes or stand still with equal probabi...原创 2019-09-04 22:53:35 · 177 阅读 · 0 评论 -
POJ 2576 Tug of War 背包问题
题目链接:POJ 2576 Tug of War题目DescriptionA tug of war is to be arranged at the local office picnic. For the tug of war, the picnickers must be divided into two teams. Each person must be on one team o...原创 2019-09-11 21:32:26 · 184 阅读 · 0 评论 -
POJ 2184 Cow Exhibition 背包问题
题目链接:POJ 2184 Cow Exhibition题目Description“Fat and docile, big and dumb, they look so stupid, they aren’t muchfun…”Cows with Guns by Dana LyonsThe cows want to prove to the public that they ar...原创 2019-09-11 21:46:25 · 138 阅读 · 0 评论 -
HDU 4507 吉哥系列故事——恨7不成妻 数位dp(超级恶心)
题目链接:HDU 4507 吉哥系列故事——恨7不成妻题目Problem Description单身! 依然单身! 吉哥依然单身! DS级码农吉哥依然单身! 所以,他生平最恨情人节,不管是214还是77,他都讨厌! 吉哥观察了214和77这两个数,发现: 2+1+4=7 7+7=72 77=711 最终,他发现原来这一切归根到底都是因为和7有关!所以...原创 2019-07-26 19:46:21 · 168 阅读 · 0 评论 -
HDU 3652 - B-number 数位dp入门
题目链接:HDU 3652 - B-number题目Problem DescriptionA wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string “13” and can be divided by 13. For example, 1...原创 2019-07-20 17:16:21 · 176 阅读 · 0 评论 -
POJ 1185 炮兵阵地 状压dp
题目链接:POJ 1185 炮兵阵地题目Description司令部的将军们打算在NM的网格地图上部署他们的炮兵部队。一个NM的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:如果在地图中的灰色所标识的平原上部署一支炮...原创 2019-07-16 17:32:23 · 131 阅读 · 0 评论 -
POJ-1463 Strategic game 树形dp
POJ-1463 Strategic game 树形dp题目DescriptionBob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very sad. Now he has the...原创 2019-05-15 21:35:44 · 105 阅读 · 0 评论 -
HDU 6024 动态规划
HDU 6024 动态规划题目Problem DescriptionHDU’s n classrooms are on a line ,which can be considered as a number line. Each classroom has a coordinate. Now Little Q wants to build several candy shops in the...原创 2019-05-26 15:27:21 · 166 阅读 · 0 评论 -
HDU 5711 - Ingress TSP+优先队列贪心
题目链接:HDU 5711 - Ingress题目Problem DescriptionBrickgao, who profited from your accurate calculating last year, made a great deal of money by moving bricks. Now he became ``gay shy fool’’ again and re...原创 2019-07-12 18:49:54 · 139 阅读 · 0 评论 -
HDU 3001 - Travelling 限制性TSP
题目链接:HDU 3001 - Travelling题目Problem DescriptionAfter coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seeing al...原创 2019-07-12 19:09:32 · 91 阅读 · 0 评论 -
HDU 5067 - Harry And Dig MachineTSP问题
题目链接:HDU 5067题目Problem DescriptionAs we all know, Harry Porter learns magic at Hogwarts School. However, learning magical knowledge alone is insufficient to become a great magician. Sometimes, Harr...原创 2019-07-11 00:35:33 · 123 阅读 · 0 评论 -
POJ 2688 - Cleaning Robot 搜索+TSP
题目链接:POJ 2688 - Cleaning Robot题目DescriptionHere, we want to solve path planning for a mobile robot cleaning a rectangular room floor with furniture.Consider the room floor paved with square tiles ...原创 2019-07-11 00:41:43 · 222 阅读 · 0 评论 -
CodeForces - 1183H Subsequences (hard version) 特殊数位dp
题目链接:CodeForces - 1183H Subsequences (hard version)题目DescripionThe only difference between the easy and the hard versions is constraints.A subsequence is a string that can be derived from another ...原创 2019-07-18 11:28:42 · 324 阅读 · 0 评论 -
ZOJ 4114 Flipping Game 动态规划
题目链接:ZOJ 4114 Flipping Game题目DescriptionLittle Sub loves playing the game Flip Me Please. In the game, lights, numbered from 1 to , are connected separately to switches. The lights may be either ...原创 2019-07-11 20:44:38 · 235 阅读 · 2 评论 -
HDU-5707 Combine String 动态规划
HDU-5707 Combine String 动态规划题目:Problem DescriptionGiven three strings a, b and c, your mission is to check whether c is the combine string of a and b.A string c is said to be the combine string of...原创 2019-05-15 21:05:38 · 209 阅读 · 0 评论