码迷,mamicode.com
首页 >  
搜索关键字:尺取法    ( 273个结果
poj 2566 Bound Found 尺取法 变形
Bound FoundTime Limit:5000MSMemory Limit:65536KTotal Submissions:2277Accepted:703Special JudgeDescriptionSignals of most probably extra-terrestrial or...
分类:其他好文   时间:2016-01-14 14:10:26    阅读次数:168
POJ 3061  Subsequence   尺取法   挑战146页
---恢复内容开始---SubsequenceTime Limit:1000MSMemory Limit:65536KTotal Submissions:10487Accepted:4337DescriptionA sequence of N positive integers (10 #inclu...
分类:其他好文   时间:2016-01-11 22:05:07    阅读次数:194
poj 2566Bound Found(前缀和,尺取法)
http://poj.org/problem?id=2566;题意:找连续的串,求和绝对值与所给数字最接近的串。思路:先求下标为1的到其他下的串的值,也就是前缀和;这样可以在O(1)的时间内求出各个串的和.比如S1(1,1),S3(1,3);那么S3-S1就是S(2,3);然后对上面所求的前缀和按从...
分类:其他好文   时间:2015-12-10 13:08:53    阅读次数:196
poj_2739 尺取法
题目大意给定一个数字N,N可能由1个或多个连续的素数求和得到,比如41 = 2+3+5+7+11+13, 41 = 11+13+17, 41 = 41。求出对于N,所有可能的组合形式。题目分析先求出所有可能构成加数的素数,使用埃氏筛选法。然后求出所有的可能形式,由于所选择的是一个连续的区间,可以使用...
分类:其他好文   时间:2015-10-25 13:36:22    阅读次数:204
poj 2566 Bound Found (前缀和,尺取法(two pointer))
Bound FoundTime Limit:5000MSMemory Limit:65536KTotal Submissions:2010Accepted:659Special JudgeDescriptionSignals of most probably extra-terrestrial or...
分类:其他好文   时间:2015-09-25 07:13:49    阅读次数:222
poj 3320 Jessica's Reading Problem (尺取法)
Jessica's Reading ProblemTime Limit:1000MSMemory Limit:65536KTotal Submissions:8787Accepted:2824DescriptionJessica's a very lovely girl wooed by lots ...
分类:其他好文   时间:2015-09-24 22:34:31    阅读次数:293
[POJ3061]Subsequence
题目链接:http://poj.org/problem?id=3061马概上学了一下《挑战程序竞赛》中作为尺取法,本题是尺取法的一道很典型的例题。尺取法真是一个很不错的小技巧。它的重点在于线性地解决了求出了满足条件的最小区间。 1 #include 2 #include 3 #include ...
分类:其他好文   时间:2015-09-08 19:58:32    阅读次数:196
Uva Galaxy(尺取法)
题意:n颗行星,给出每个点的一维坐标,可以删去m个点,使剩下所有点到剩余点集中心的距离的平方的和最小,求该最小值;思路:尺取法,每次维护n-m个点;long long用%lld读入,但codeblocks编译会出现问题,所以用cin>>;#include#include#include#includ...
分类:其他好文   时间:2015-09-01 14:00:23    阅读次数:188
poj 2739 Sum of Consecutive Prime Numbers(尺取法)
DescriptionSome positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given pos...
分类:其他好文   时间:2015-08-28 19:27:36    阅读次数:137
poj 2100 Graveyard Design(尺取法)
DescriptionKing George has recently decided that he would like to have a new design for the royal graveyard. The graveyard must consist of several sec...
分类:其他好文   时间:2015-08-28 19:23:49    阅读次数:143
273条   上一页 1 ... 19 20 21 22 23 ... 28 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!