
动态规划
文章平均质量分 82
lljjccsskk
这个作者很懒,什么都没留下…
展开
-
hdu-1619 Unidirectional TSP(dp)
学习dp中。Unidirectional TSPTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 356 Accepted Submission(s): 176Problem DescriptionProbl原创 2015-08-12 20:21:07 · 409 阅读 · 0 评论 -
UVa-10618 Tango Tango Insurrection&& UVa-1627 Team them up!
10618题意繁复,见紫书P291本题条件比较复杂,是情况比较多的多维dp,个人认为难点在处理各阶段关系上。看了紫书详细的解释,将各状态下的决策结果通过构造函数计算出来即可。记录一下,以后温习直接翻书。#include #include #include #include #include #include #include #include #include #in原创 2016-04-04 18:10:54 · 262 阅读 · 0 评论 -
UVa-12186 Another Crisis (dp)
A couple of years ago, a new world wide crisis started, leaving many people with economical problems.Some workers of a particular company are trying to ask for an increase in their salaries.The comp原创 2016-03-14 09:11:53 · 296 阅读 · 0 评论 -
UVa-1228 Perfect Service
Perfect ServiceTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionA network is composed of N computers connected b原创 2016-03-15 15:24:39 · 337 阅读 · 0 评论 -
UVA-1631 Locker(DP)
A password locker withN digits, each digit can be rotated to 0-9 circularly.You can rotate 1-3 consecutive digits up or down in one step.For examples:567890 → 567901 (by rotating the last 3 digi原创 2016-04-26 20:24:16 · 382 阅读 · 0 评论 -
UVA-1632 Alibaba (区间DP)
Alibaba the famous character of our childhood stories would like to be immortal in order to keepbringing happiness to children. In order to rich this status he needs to prove that he is still able t原创 2016-04-27 00:18:41 · 362 阅读 · 0 评论 -
UVA-10163 Storage Keepers (DP多次)
Randy Company hasN (1≤ N≤ 100) storages. Company wants some men to keep them safe. Nowthere areM (1≤ M≤ 30) men asking for the job. Company will choose several from them. RandyCompany empl原创 2016-04-28 09:21:16 · 362 阅读 · 0 评论 -
UVA-10641 Barisal Stadium (DP+几何)
The BCCB (Bangladesh Cricket Control Board) has decided to build a new international cricket stadiumin Barisal. It will be convex in shape unlike others. Floodlight will be placed outside the stadium原创 2016-04-29 09:42:35 · 688 阅读 · 0 评论 -
UVA-1630 Folding (KMP、区间dp)
FoldingTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionBill is trying to compactly represent sequences of capit原创 2016-04-20 21:15:09 · 378 阅读 · 0 评论 -
UVa-1252 Twenty Questions (位运算)
Twenty QuestionsTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionConsider a closed world and a set of features tha原创 2016-04-01 09:46:52 · 291 阅读 · 0 评论 -
UVa-10817 Headmaster's Headache (位运算)
Headmaster's HeadacheThe headmaster of SpringField School is consider-ing employing some newteachers for certain subjects.There are a number of teach-ers applying for the posts.Each teacher is原创 2016-03-30 21:54:55 · 420 阅读 · 0 评论 -
hdu 1159/poj1458 Common Subsequence 最长公共子串
最长公共子串经典题原创 2015-08-12 20:31:46 · 344 阅读 · 0 评论 -
hdu2602-Bone Collector (背包)
Bone CollectorDescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he we原创 2015-08-13 21:59:45 · 307 阅读 · 0 评论 -
hdu-1513 Palindrome
PalindromeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4157 Accepted Submission(s): 1420Problem DescriptionA palindrome is a s原创 2015-08-12 20:45:52 · 306 阅读 · 0 评论 -
Poj 1651 Multiplication Puzzle
Multiplication PuzzleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4948 Accepted: 2958DescriptionThe multiplication puzzle is pl转载 2015-08-12 23:41:52 · 266 阅读 · 0 评论 -
hdu 1114-Piggy-Bank
Piggy-BankTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionBefore ACM can do anything, a budget must be prepared and the necessary fin原创 2015-08-13 22:06:03 · 318 阅读 · 0 评论 -
UVALive 4857- Halloween Costumes
此题与之前food delivery同为区间dp,但是我依然没有想到……大致题意为题目提供了n个party,每个party对应一件衣服。由于party对衣服有要求,所以要按穿要求的衣服。衣服穿上可以脱下,但不能再穿回去,若要穿上需要算一套新衣服。求符合party要求情况下的衣服最小件数。说说思路:在不知其他party情况下,假设在i到j个party之间衣服件数为dp[i][j],则原创 2015-08-14 21:31:02 · 340 阅读 · 0 评论 -
ZOJ 3469-Food Delivery(区间dp经典题)
Food DeliveryTime Limit: 2 Seconds Memory Limit: 65536 KB When we are focusing on solving problems, we usually prefer to stay in front of computers rather than go out for lunch. At this原创 2015-08-14 21:10:31 · 401 阅读 · 0 评论 -
poj 3264 -Balanced Lineup (RMQ与线段树两种做法)
Balanced Lineup DescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee原创 2015-08-14 21:50:37 · 362 阅读 · 0 评论 -
UVA-3516 Exploring Pyramids (DP)
Exploring PyramidsTime Limit: 3000MS 64bit IO Format: %lld & %lluSubmit Status uDebugDescriptionProblem descriptions:System Crawler 2016-10-16原创 2016-10-20 16:39:48 · 259 阅读 · 0 评论