码迷,mamicode.com
首页 >  
搜索关键字:sticks    ( 387个结果
POJ 2653 Pick-up sticks (线段相交)
题意:给你n条线段依次放到二维平面上,问最后有哪些没与前面的线段相交,即它是顶上的线段 题解:数据弱,正向纯模拟可过 但是有一个陷阱:如果我们从后面向前枚举,找与前面哪些相交,再删除前面那些相交的线段,这样就错了 因为如果线段8与5,6,7相交了,我们接下来不能直接判断4,我们还要找7,6,5与之前 ...
分类:其他好文   时间:2016-11-05 02:58:19    阅读次数:299
POJ2513 Colored Sticks
Time Limit: 5000MS Memory Limit: 128000K Total Submissions: 36032 Accepted: 9427 Description You are given a bunch of wooden sticks. Each endpoint of ...
分类:其他好文   时间:2016-11-01 19:38:03    阅读次数:191
Sticks_dfs
Description George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to ...
分类:其他好文   时间:2016-10-31 21:56:15    阅读次数:203
Wooden Sticks(hdu1051)
Wooden Sticks Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice _ Description There is a pile of n wooden st ...
分类:其他好文   时间:2016-10-15 19:02:57    阅读次数:173
POJ2452 Sticks Problem
题解: 这题可以rmq+二分做,也可以单调栈+线性扫 单调栈+线性扫: 对a[i],d[i]表示以a[i]为起点,大于a[i]的最长长度 例如 a 4 3 5 6 dis 1 3 2 1 然后对于每个dis,求出枚举最大值的位置。更新即可.. 关键是求dis.这里用到了单调栈的思想 rmq+二分做: ...
分类:其他好文   时间:2016-10-05 15:20:26    阅读次数:148
hdu 3573(数学+贪心)
Buy Sticks Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 868 Accepted Submission(s): 392 Proble ...
分类:其他好文   时间:2016-09-28 22:41:06    阅读次数:238
UVa307 Sticks (DFS+剪枝)
链接:http://vjudge.net/problem/19648 分析:这题重要的是剪枝。maxd表示的是最小可能长度(把砍完的木棍长度降序排好,最小可能长度大于等于砍完后最长的木棍长度,小于等于总长度的一半,且木棍的根数是整数,所以(总长度%每段最小可能长度=0)),dfs的三个状态分别为cu ...
分类:其他好文   时间:2016-09-11 06:47:36    阅读次数:164
POJ1065Wooden Sticks[DP LIS]
Wooden Sticks Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 21902 Accepted: 9353 Description There is a pile of n wooden sticks. The leng ...
分类:其他好文   时间:2016-08-31 13:50:27    阅读次数:122
poj 1065 贪心算法
Wooden Sticks Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 21899 Accepted: 9350 Description There is a pile of n wooden sticks. The leng ...
分类:编程语言   时间:2016-08-31 00:46:03    阅读次数:238
HDU1051 贪心
Wooden Sticks Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18745 Accepted Submission(s): 7692 ...
分类:其他好文   时间:2016-08-22 19:57:29    阅读次数:176
387条   上一页 1 ... 12 13 14 15 16 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!