
尺取法
文章平均质量分 71
ctrss
这个作者很懒,什么都没留下…
展开
-
poj 3320Jessica's Reading Problem 尺取法初探(首尾指针法)
题意:某穷屌丝为了顺利成为白富美的备胎,准备在一串数字中找到一个最短区间,该区间包含所有出现过的数字。 尺取法一般思路 整个过程分为4布: 1.初始化左右端点 2.不断扩大右端点,直到满足条件 3.如果第二步中无法满足条件(右端点超出大区间),则终止,否则更新结果 4.将左端点扩大1,然后回到第二步 尺取法复杂度为o(n)原创 2016-01-26 01:33:49 · 390 阅读 · 0 评论 -
Educational Codeforces Round 5 (D. Longest k-Good Segment)(尺取法)
D. Longest k-Good Segment time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The array a withn integers is given. Let's call th原创 2016-01-29 01:59:54 · 526 阅读 · 0 评论 -
cf676c Vasya and String 尺取法裸题
C. Vasya and String time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output High school student Vasya got a string o原创 2016-05-26 14:25:30 · 843 阅读 · 0 评论