https://odzkskevi.qnssl.com/e17d84412b7ea3a42b6503109d6dfbc1?v=1508053531 【题解】 裸区间dp,注意一堆细节 1 #include <iostream> 2 #include <cstdio> 3 #include <algo ...
分类:
其他好文 时间:
2017-10-20 21:50:17
阅读次数:
187
Wooden Sticks http://poj.org/problem?id=1065 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 24062 Accepted: 10369 Description There is a p ...
分类:
其他好文 时间:
2017-10-10 13:22:53
阅读次数:
190
2529: [Poi2011]Sticks Description Little Johnny was given a birthday present by his grandparents. This present is a box of sticks of various lengths a ...
分类:
其他好文 时间:
2017-10-09 20:57:50
阅读次数:
200
题目描述: AC源码: 此题考查贪心算法,解题思路:首先使用快速排序,以w或l按升序排序(注意相等时,应按另一值升序排序),这样就将二维变量比较,变为了一维的,排好序的一边就不需要去管了,只需要对未排序的一边直接进行贪心遍历。时间复杂度O(n^2) ...
分类:
编程语言 时间:
2017-10-07 17:47:42
阅读次数:
212
题目:http://acm.hdu.edu.cn/showproblem.php?pid=5543 题意:给你一块长为L的木板,和n个金条,每个金条有一个长度和价值 只要金条的重心在木板上就可以放上去,但不能重叠,问最多能拿多大价值 很容易想到背包问题,但是题目给出了一定限制 因为最多有2根金条是半 ...
分类:
其他好文 时间:
2017-09-20 14:22:57
阅读次数:
145
http://poj.org/problem?id=2513 Colored Sticks Time Limit: 5000MS Memory Limit: 128000K Total Submissions: 37812 Accepted: 9907 Description You are giv ...
分类:
其他好文 时间:
2017-09-15 22:34:24
阅读次数:
147
Colored Sticks Time Limit: 5000MS Memory Limit: 128000K Total Submissions: 37759 Accepted: 9894 Description You are given a bunch of wooden sticks. Ea ...
分类:
其他好文 时间:
2017-09-10 19:48:02
阅读次数:
127
题目描述 给出若干木棍,每根木棍有特定的颜色和长度。问能否找到三条颜色不同的木棍构成一个三角形。(注意这里所说的三角形面积要严格大于0) 输入 第一行给出一个整数k(3<=k<=50),表示颜色的种数。这k种颜色被标号为1至k。接下来k行,第i+1描述颜色为i的木棍的信息。首先一个整数Ni(1<=N ...
分类:
其他好文 时间:
2017-08-24 18:05:04
阅读次数:
131
【BZOJ2529】[Poi2011]Sticks Description 给出若干木棍,每根木棍有特定的颜色和长度。问能否找到三条颜色不同的木棍构成一个三角形。(注意这里所说的三角形面积要严格大于0)第一行给出一个整数k(3<=k<=50),表示颜色的种数。这k种颜色被标号为1至k。接下来k行,第 ...
分类:
其他好文 时间:
2017-08-24 10:24:02
阅读次数:
124
C - Make a Rectangle Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement We have N sticks with negligible thickness. The len ...
分类:
其他好文 时间:
2017-08-21 14:55:43
阅读次数:
236