摘要: 1 #include 2 #include 3 using namespace std; 4 const int maxn=1e6+7; 5 string s,t; 6 int n1,n2; 7 bool vis[maxn]; 8 int nxt[maxn],after[maxn],f[maxn],before[maxn]; 9 void process(){ 10 f... 阅读全文
posted @ 2018-08-29 18:30 lcan 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 子矩阵值最大 枚举竖行上下界,横行记录最大值和次大值 二分答案:枚举值,大于的为一,小于为0 找全是1的矩阵O(n^3)->bitset:数1的个数 logn*(n^2+(n^3)/32) 阅读全文
posted @ 2018-08-29 16:10 lcan 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 转化,思路,树状数组统计 阅读全文
posted @ 2018-08-29 14:46 lcan 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 1 struct{ 2 int x,y; 3 }a 4 sort(a,cmp) 5 for(int i=1;i<=n;i++){ 6 ans[i]=sum(a[i].y-1); 7 add(a[i].x); 8 } 阅读全文
posted @ 2018-08-29 07:42 lcan 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 区间DP 阅读全文
posted @ 2018-08-28 16:30 lcan 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 堆,思路 阅读全文
posted @ 2018-08-28 15:00 lcan 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 思路,枚举,暴力 阅读全文
posted @ 2018-08-28 14:25 lcan 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 卡特兰数,高精度 阅读全文
posted @ 2018-08-27 16:06 lcan 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 矩阵乘法,运算符重载 阅读全文
posted @ 2018-08-27 09:10 lcan 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 容斥原理,组合数,乘法原理 阅读全文
posted @ 2018-08-26 19:38 lcan 阅读(200) 评论(0) 推荐(0) 编辑