![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
【尺取法】
WangMeow
这个作者很懒,什么都没留下…
展开
-
[POJ](3061)Subsequence ---- 尺取法
Description A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the min...原创 2018-04-11 12:16:20 · 130 阅读 · 0 评论 -
[51Nod](1127)最短的包含字符串 ---- 尺取法
给出一个字符串,求该字符串的一个子串S,S包含A-Z中的全部字母,并且S是所有符合条件的子串中最短的,输出S的长度。如果给出的字符串中并不包括A-Z中的全部字母,则输出No Solution。 Input 第1行,1个字符串。字符串的长度 <= 100000。 Output 输出包含A-Z的最短子串长度。如果没有符合条件的子串,则输出No Solution。 Input...原创 2018-04-11 15:25:02 · 148 阅读 · 0 评论 -
Codeforces Round #333 (Div. 2) B. Approximating a Constant Range ---- 尺取+树状数组(区间最值)
题目传送门 做法:在尺取的过程中用树状数组查询区间最值。复杂度O(2*n*log^2(n)) AC代码: #include<bits/stdc++.h> #define IO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0) #define pb(x) push_back(x) #define ...原创 2018-09-27 16:52:09 · 116 阅读 · 0 评论