摘要: #高精度加法模板 高精度加法模板 #include <bits/stdc++.h> using namespace std; vector<int> add(vector<int> &A, vector<int> &B){ if(A.size() < B.size()) return add(B, 阅读全文
posted @ 2022-11-28 09:51 csai_H 阅读(75) 评论(0) 推荐(0)
摘要: #二维差分 始终记住对b[i][j]修改会影响a数组中从a[i][j]及往后的每一个数。 a[][]数组是b[][]数组的前缀和数组,那么b[][]是a[][]的差分数组 考虑如何构造差分数组b[i][j],使得a数组中a[i][j]是b数组左上角(1,1)到右下角(i,j)所包围矩形元素的和。 b 阅读全文
posted @ 2022-11-28 09:19 csai_H 阅读(157) 评论(0) 推荐(0)
摘要: #快排模板快排分析 ##分治的思想 确定分界点x: q[l], q[r], q[(l+r)/2]随机; 调整区间,使得x左边区间的数 <= x,右边区间的数 >= x;(快排的核心所在) 递归处理左右两段 #include <bits/stdc++.h> using namespace std; c 阅读全文
posted @ 2022-11-28 08:59 csai_H 阅读(41) 评论(0) 推荐(0)