摘要: https://www.luogu.com.cn/problem/P1020 #include<bits/stdc++.h> using namespace std; int a[1000000],l[1000000]; int main() { int n=1,cnt=0,len1=1; whil 阅读全文
posted @ 2020-08-22 21:51 zlq, 阅读(69) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P1480 #include<bits/stdc++.h> using namespace std; char a[50000]; int aa[50000],cc[50000]; int main() { int bb; cin>> 阅读全文
posted @ 2020-08-22 16:07 zlq, 阅读(210) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P2841 #include<bits/stdc++.h> using namespace std; char a[30000],b[30000]; int aa[30000],bb[30000],cc[30000]; int mai 阅读全文
posted @ 2020-08-22 15:58 zlq, 阅读(118) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P2142 #include<bits/stdc++.h> using namespace std; char a[100860],b[100860]; int aa[100860],bb[100860],cc[100860]; in 阅读全文
posted @ 2020-08-22 15:48 zlq, 阅读(84) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P1601 #include<bits/stdc++.h> using namespace std; string a,b; int aa[1000],bb[1000],cc[1000],lenc; int main() { mems 阅读全文
posted @ 2020-08-22 15:11 zlq, 阅读(144) 评论(0) 推荐(0) 编辑
摘要: http://ybt.ssoier.cn:8088/problem_show.php?pid=1224 类似最大子段和 枚举矩阵的左端点i和右端点j 将每一行的i到j之间的区间和(前缀和求出)视为一个元素,求由它们构成的数列中的最大子段和 时间复杂度o(n^3) #include<bits/stdc 阅读全文
posted @ 2020-08-22 11:37 zlq, 阅读(119) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.com.cn/problem/P1115 b[i]为以a[i]为结尾的子段中的最大子段和 1. 非空子段: b[i]=max(a[i],b[i-1]+a[i]); 2. 可以为空的子段: b[i]=max(0,a[i],b[i-1]+a[i]); 因为b[i-1] 阅读全文
posted @ 2020-08-22 10:42 zlq, 阅读(102) 评论(0) 推荐(0) 编辑