/*
中文题目 木头
中文翻译-大意 加工第一个木头要调试机器,所以要一分钟,后面的木头在长度和重量上都要大于等于前一个木头,才不要调试机器,否则要调试机器,再花费一分钟
解题思路:先将木头的长度按升序排序,后面质量发生冲突的地方就要在之后重新安排一下
解题人:lingnichong
解题时间:2014-10-25 16:33:10
解题体会:一个括号的丢失,就导致错了一大片
*/
...
分类:
编程语言 时间:
2014-10-25 17:27:49
阅读次数:
253
Wooden Sticks
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 12157 Accepted Submission(s): 5036
Problem Description
There is a ...
分类:
其他好文 时间:
2014-10-25 15:52:18
阅读次数:
202
Colored Sticks
Time Limit: 5000MS
Memory Limit: 128000K
Total Submissions: 31015
Accepted: 8180
Description
You are given a bunch of wooden sticks. Each endpoint of e...
分类:
其他好文 时间:
2014-10-22 01:09:19
阅读次数:
193
这题的思路是从书上看来的,不过好歹也弄明白原因了;注释清楚 方便以后看看.题意是 有若干 长度相同的棍子..英语水平有限,一开始没看懂,以为只有1根,要多多练习啊.. 1 #include 2 #include 3 #define maxn 70 4 using namespace std; 5 ....
分类:
其他好文 时间:
2014-10-10 15:22:50
阅读次数:
210
题意:有一个长为L的木棍,木棍中间有n个切点。每次切割的费用为当前木棍的长度。求切割木棍的最小费用。分析:d(i, j)表示切割第i个切点到第j个切点这段所需的最小费用。则有d(i, j) = min{d(i, k) + d(k, j)} + a[j] - a[i]; ( i 3 #include....
分类:
其他好文 时间:
2014-10-05 01:50:27
阅读次数:
380
题目链接:
http://poj.org/problem?id=2513
Colored Sticks
Time Limit: 5000MS
Memory Limit: 128000K
Total Submissions: 30955
Accepted: 8159
Description
You a...
分类:
其他好文 时间:
2014-10-03 13:05:24
阅读次数:
251
Two polar bears Menshykov and Uslada from the St.Petersburg zoo and elephant Horace from the Kiev zoo got six sticks to play with and assess the animals' creativity. Menshykov, Uslada and Horace decid...
分类:
其他好文 时间:
2014-09-28 10:50:23
阅读次数:
196
http://poj.org/problem?id=2513DescriptionYou are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possibl...
分类:
其他好文 时间:
2014-09-22 22:49:43
阅读次数:
285
题目:求一个序列中最大不上升子序列的个数。
分析:dp,LIS。一个序列中的不上升子序列的最小个数,是他的最大上升子序列长度。
证明:首先求串的最大上升子序列,那么每个元素一定属于一个不同的不下降串;
如果,取第一个最大上升子序列,那么每个元素一定是集合中的最大值;
这些...
分类:
其他好文 时间:
2014-09-21 23:41:21
阅读次数:
321
题目:uva 10003 Cutting Sticks
题意:给出一根长度 l 的木棍,要截断从某些点,然后截断的花费是当前木棍的长度,求总的最小花费?
分析:典型的区间dp,其实和石子归并是一样的,花费就是石子的和,那么久不用多说了。
AC代码:
#include
#include
#include
#include
#include
#include
#in...
分类:
其他好文 时间:
2014-09-18 18:53:24
阅读次数:
201