摘要:
这没什么好讲的,都是套路。 话说我的代码在本地跑得贼慢,我还以为会TLE,然后发现时限有4s 看代码: #include<bits/stdc++.h> using namespace std; const int maxn=5*1e6+10; int f[maxn],a[maxn],n,m; int 阅读全文
摘要:
重构树的版子题,当然也可以用倍增或二分答案。 看代码: #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 阅读全文
摘要:
简单的可持久化。 是刚学主席树的练手好题!! #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 阅读全文
摘要:
这是树上待修莫队的裸题。 可是我已开始应为吧cmp写错了TLE成30,呜呜…… 看代码: #include<bits/stdc++.h> using namespace std; #define int long long const int maxn=1e5+10; int n,m,q,a[max 阅读全文