摘要:
```cpp include include include include using namespace std; int n, m, a[50005], blc, bel[50005], cnt[50005]; long long ansfz[50005], ansfm[50005], ans 阅读全文
摘要:
算法竞赛进阶指南p219,这里是分块。 当然也可以树套树来个动态二维数点。 cpp include include include include include using namespace std; typedef long long ll; int xx, yy, n, uu, vv, bl 阅读全文
摘要:
"hzwer的讲解" 一 给出一个长为 $n$ 的数列,以及 $n$ 个操作,操作涉及区间加法,单点查值。 cpp include include include include include using namespace std; int n, blc, a[50005], tag[50005 阅读全文
摘要:
可以用树状数组,线段树,分块做。代码是分块 cpp include include include using namespace std; typedef long long ll; int n, m, uu, vv, ww, blc, bel[100005]; ll sum[100005], t 阅读全文
摘要:
扫描线应该打懒标记的…… cpp include include include using namespace std; typedef long long ll; int T, n, m, w, h, cnt, uu, vv, ww, zdz[80005], ans, tag[80005]; l 阅读全文
摘要:
参见算法竞赛进阶指南190页 cpp include include include using namespace std; int n, m, num[10005], qwq=1, fa[10005], dis[10005]; char ss[15]; struct Node{ int l, r 阅读全文
摘要:
参见算法竞赛进阶指南77页 参考算法竞赛进阶指南188页 cpp include include include using namespace std; int n, fa[10005], ans; struct Node{ int p, d; }nd[10005]; bool cmp(Node 阅读全文