摘要: 这没什么好讲的,都是套路。 话说我的代码在本地跑得贼慢,我还以为会TLE,然后发现时限有4s 看代码: #include<bits/stdc++.h> using namespace std; const int maxn=5*1e6+10; int f[maxn],a[maxn],n,m; int 阅读全文
posted @ 2020-03-17 17:25 syzf2222 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 请点这里,我实在是懒得复制粘贴了。 阅读全文
posted @ 2020-03-17 16:47 syzf2222 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 重构树的版子题,当然也可以用倍增或二分答案。 看代码: #include<bits/stdc++.h> using namespace std; const int maxn=1e6+10; struct node{ int x,y,z; }edge[maxn]; int n,m,q,cnt; in 阅读全文
posted @ 2020-03-17 14:48 syzf2222 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 简单的可持久化。 是刚学主席树的练手好题!! #include<bits/stdc++.h> using namespace std; const int maxn=2*1e6+10; struct node{ int l,r,val; }tr[maxn]; int n,cnt,tot,root[m 阅读全文
posted @ 2020-03-17 11:39 syzf2222 阅读(158) 评论(0) 推荐(0) 编辑