
ACM模板
洋亦
绝不内耗!!!!!顺利毕业!!!!!!!!!!!!!!!!!
展开
-
尺取法板子
/*尺取法:先移动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 · 109 阅读 · 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 · 268 阅读 · 0 评论