ACM 背包&DP
文章平均质量分 90
青山绿水之辈
奋斗青春年华
展开
-
hdu3280Equal Sum Partitions (区间DP)
Problem DescriptionAn equal sum partition of a sequence of numbers is a grouping of the numbers (in the same order as the original sequence) in such a way that each group has the same sum. For examp原创 2014-07-20 13:02:36 · 1221 阅读 · 0 评论 -
POJ2288Islands and Bridges(状态压缩DP,求最大路和走条数)
Islands and BridgesTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 8845 Accepted: 2296DescriptionGiven a map of islands and bridges that connect these i原创 2014-08-11 16:03:17 · 1207 阅读 · 0 评论 -
HDU1565方格取数(1)(状态压缩DP)
方格取数(1)Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5530 Accepted Submission(s): 2094Problem Description给你一个n*n的格子的棋盘,每个格子里面有原创 2014-08-26 18:55:37 · 1041 阅读 · 0 评论 -
BNU25359Escape Time II(状态压缩DP)
There is a fire in LTR ’ s home again. The fire can destroy all the things in t seconds, so LTR has to escape in t seconds. But there are some jewels in LTR ’ s rooms, LTR love jewels very much so h原创 2014-08-29 21:38:08 · 864 阅读 · 0 评论 -
zoj3013Word Segmenting (字典树+dp)
Word SegmentingTime Limit: 5 Seconds Memory Limit: 32768 KB Special Judge One key technology in Chinese search engine is Word Segmenting, which is more difficult than English Word Segmenting原创 2014-08-17 16:07:22 · 1069 阅读 · 0 评论 -
BNUOJ29065鸣人的查克拉
鸣人的查克拉Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name: MainPrev Submit Status Statistics Discuss NextFont Size: + -Type:原创 2014-10-06 09:37:07 · 1099 阅读 · 0 评论 -
B. 沙漠之旅(分组背包)
B. 沙漠之旅Time Limit: 1000msCase Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name: MainSubmit Status PID: 29376Font Size: + -原创 2014-10-05 19:56:40 · 1132 阅读 · 0 评论 -
FZUProblem 2129 子序列个数(dp)
Problem 2129 子序列个数Accept: 147 Submit: 432Time Limit: 2000 mSec Memory Limit : 32768 KB Problem Description子序列的定义:对于一个序列a=a[1],a[2],......a[n]。则非空序列a'=a[p1],a[p2]......a[pm]为a的一个子原创 2014-12-16 14:49:14 · 981 阅读 · 0 评论 -
hdu3001Travelling (状态压缩DP,三进制)
TravellingTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3611 Accepted Submission(s): 1132Problem DescriptionAfter coding so many days原创 2014-08-10 22:01:23 · 2227 阅读 · 1 评论 -
HDU4939Stupid Tower Defense (有思想的dp)
Stupid Tower DefenseTime Limit: 12000/6000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1557 Accepted Submission(s): 445Problem DescriptionFSF is addict原创 2014-09-18 23:30:18 · 2076 阅读 · 0 评论 -
poj2955Brackets(区间DP)
DescriptionWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence,if s is a regular brackets sequence, then (s) and [s]原创 2014-07-19 21:58:56 · 1009 阅读 · 0 评论 -
hdu4570Multi-bit Trie (区间DP)
Problem Description IP lookup is one of the key functions of routers for packets forwarding and classifying. Generally, IP lookup can be simplified as a Longest Prefix Matching (LPM) problem. That'原创 2014-07-20 00:30:38 · 1283 阅读 · 0 评论 -
poj1651Multiplication Puzzle(取数,区间DP)
DescriptionThe multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the row and scores the number of points原创 2014-07-21 20:42:13 · 1067 阅读 · 0 评论 -
hdu4283You Are the One (区间DP)
Problem Description The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The show is hold in the Small hall原创 2014-07-21 20:28:57 · 1266 阅读 · 0 评论 -
poj3186Treats for the Cows(区间DP)
DescriptionFJ has purchased N (1 The treats are interesting for many reasons:The treats are numbered 1..N and stored sequentially in single file in a long box that is open at both ends. On原创 2014-07-21 20:43:12 · 1195 阅读 · 0 评论 -
HDU4968Improving the GPA(分组背包)
Improving the GPATime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 283 Accepted Submission(s): 232Problem DescriptionXueba: Using原创 2014-08-20 16:52:42 · 1008 阅读 · 0 评论 -
zoj2297Survival (状态压缩DP)
SurvivalTime Limit: 5 Seconds Memory Limit: 32768 KB The King of Fighter 97 (KOF97) is an electronic game of wrestling type. Once it was fashionable among youths. The game is amused. However原创 2014-08-08 19:48:41 · 1130 阅读 · 0 评论 -
HDU4960Another OCD Patient(区间dp,分块后再DP)
Another OCD PatientTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 716 Accepted Submission(s): 270Problem DescriptionXiaoji is原创 2014-08-20 23:38:29 · 1101 阅读 · 0 评论 -
CD(01背包)
CD You have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is on CDs. You need to have it on tapes so the problem to solve is: you have a tape N m原创 2014-12-01 21:05:01 · 994 阅读 · 0 评论 -
POJ2392Space Elevator(多重背包)
Space ElevatorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8701 Accepted: 4135DescriptionThe cows are going to space! They plan to achieve orbit by b原创 2014-12-19 21:38:16 · 989 阅读 · 0 评论 -
HDU4281 Judges' response(状态压缩+01背包+分组背包)经典
Judges' responseTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 565 Accepted Submission(s): 308Problem Description The contest i原创 2014-12-05 22:44:29 · 1333 阅读 · 0 评论 -
CSU 1616: Heaps(区间DP)优化版
1616: HeapsTime Limit: 2 Sec Memory Limit: 128 MBSubmit: 31 Solved: 5[Submit][Status][Web Board]DescriptionZuosige always has bad luck. Recently, he is in hospital because of pneum原创 2015-05-10 19:35:55 · 960 阅读 · 0 评论 -
CSU 1620: A Cure for the Common Code(KMP+区间DP)
DescriptionInputOutputSample Inputabcbcbcbcaabbbcdcdcdabbbcdcdcd0Sample OutputCase 1: 7Case 2: 11HINT题意:给一个小写子母的串,相邻相同的子串可以合在一起,问这个串合并后原创 2015-05-17 19:39:17 · 1139 阅读 · 0 评论 -
HDU 5273 Dylans loves sequence(区间DP)
Dylans loves sequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 114 Accepted Submission(s): 59Problem DescriptionDylans is原创 2015-06-20 21:45:27 · 1218 阅读 · 0 评论 -
HDU1028Ignatius and the Princess III(一个数有多少种组合方式,DP)与放n个苹果在m个盘子有多少生种组合一样(两种方法解)
Ignatius and the Princess IIITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15210 Accepted Submission(s): 10724Problem Description原创 2015-06-03 14:33:51 · 2382 阅读 · 0 评论 -
HDU 5280 Senior's Array
Senior's ArrayTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 528 Accepted Submission(s): 209Problem DescriptionOne day, Xuejieji原创 2015-07-12 12:06:59 · 937 阅读 · 0 评论 -
hdu 4628 Pieces(状态压缩+记忆化搜索)
PiecesTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1811 Accepted Submission(s): 932Problem DescriptionYou heart broke in原创 2015-07-05 19:48:12 · 1147 阅读 · 0 评论 -
HDU 4640 Island and study-sister(状态压缩DP+路径压缩)经典 旅行商问题
Island and study-sisterTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 790 Accepted Submission(s): 273Problem DescriptionMember原创 2015-07-15 16:31:08 · 1010 阅读 · 0 评论 -
HUNNU 11568 Interstellar Travel(DP+优先队列)
Interstellar TravelTime Limit: 1000ms, Special Time Limit:2500ms,Memory Limit:65536KBTotal submit users: 2, Accepted users:1Problem 11568 : No special judgementProblem desc原创 2015-08-08 18:22:37 · 894 阅读 · 0 评论 -
CSU 1611: Concatenation(状态压缩DP)
1611: ConcatenationTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 14 Solved: 4[Submit][Status][Web Board]DescriptionZuosige always has bad luck. Recently, he is in hospital because原创 2015-05-10 19:38:33 · 837 阅读 · 0 评论 -
CSU1580: Outing(强连通+拓扑排序+dp)
DescriptionInputOutputSample Input4 41 2 3 4Sample Output4HINTSourceNCPC 2014#include#include#includeusing namespace原创 2015-04-26 19:14:32 · 868 阅读 · 0 评论 -
HDU3810 Magina(搜索+用优先队列模拟01背包)经典
MaginaTime Limit: 60000/30000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 528 Accepted Submission(s): 177Problem DescriptionMagina, also known as A原创 2015-01-14 20:55:37 · 1414 阅读 · 0 评论 -
九度OJ 1497:面积最大的全1子矩阵(DP)
题目1497:面积最大的全1子矩阵时间限制:1 秒内存限制:128 兆特殊判题:否提交:850解决:178题目描述:在一个M * N的矩阵中,所有的元素只有0和1,从这个矩阵中找出一个面积最大的全1子矩阵,所谓最大是指元素1的个数最多。输入:输入可能包含多个测试样例。对于每个测试案例,输入的第一原创 2014-12-10 19:12:00 · 1805 阅读 · 0 评论 -
POJ1837Balance(分组背包)
BalanceTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 11042 Accepted: 6855DescriptionGigel has a strange "balance" and he wants to poise it. Actually,原创 2015-01-15 17:34:46 · 914 阅读 · 0 评论 -
HDU2614Beat(DP状态压缩路径)
BeatTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 669 Accepted Submission(s): 424Problem DescriptionZty is a man that always fu原创 2014-12-10 18:40:00 · 1106 阅读 · 0 评论 -
ZOJ3662Math Magic(分组背包+完全背包)
I - Math MagicTime Limit:3000MS Memory Limit:32768KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionYesterday, my teacher taught us about math: +, -, *, /, GCD, LCM...原创 2015-01-18 17:53:11 · 1108 阅读 · 0 评论 -
HDU3311Dig The Wells(斯坦纳树,spfa+状态压缩DP)可作模板
Dig The WellsTime Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1037 Accepted Submission(s): 453Problem DescriptionYou may all know原创 2015-03-26 22:23:27 · 1761 阅读 · 0 评论 -
ZOJ3524Crazy Shopping(完全背包+拓扑排序)经典
H - Crazy ShoppingTime Limit:3000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionBecause of the 90th anniversary of the Coherent & Cute Patchouli原创 2015-01-17 22:43:35 · 1462 阅读 · 0 评论 -
HDU2833 WuKong(floyd + dp)经典
WuKongTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1429 Accepted Submission(s): 517Problem DescriptionLiyuan wanted to rewrite原创 2015-04-18 19:55:07 · 1053 阅读 · 0 评论 -
HNU Cent Savings (DP)
Cent SavingsTime Limit: 5000ms, Special Time Limit:12500ms,Memory Limit:65536KBTotal submit users: 54, Accepted users:36Problem 13345 : No special judgementProblem descript原创 2015-08-02 20:28:06 · 784 阅读 · 0 评论