![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM模板
颀羽
hin优雅
展开
-
尺取法板子
/* 尺取法:先移动r后移动l,找到满足的区间 */ #include<bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 0x3f3f3f3f; const int MAXN = 1e7 + 100; const double eps = 1e-6; ll gcd(ll a,ll b){return b==0? a:gcd(b,a%b);} int a[MAXN]; int main(){原创 2021-05-29 15:54:22 · 87 阅读 · 0 评论 -
lower_bound与upper_bound,o(nlogn)的lis解法
文章目录lower_bound与upper_bound:最长上升子序列与最长非递减子序列: lower_bound与upper_bound: lower_bound(va.begin(),va.end(),a[i]);//返回第一个大于等于a[i]的地址 upper_bound(va.begin(),va.end(),a[i]);//返回第一个大于a[i]的地址 最长上升子序列与最长非递减子序列: #include<bits/stdc++.h> using namespace std;原创 2021-05-29 15:01:53 · 215 阅读 · 0 评论