摘要:
题链 原来这才是可持久化的基础之基础 #include <bits/stdc++.h> //#include <ext/rope> //using namespace __gnu_cxx; using namespace std; #define LL long long #define ll lo 阅读全文
posted @ 2021-05-18 20:54
棉被sunlie
阅读(65)
评论(0)
推荐(0)
摘要:
题链 dp[x] 表示以 x 为进化终点能取得的最大进化次数; 可以发现 dp[x] 等于 树上x的前缀最大值 +1; 但是不可能递归寻找x的父亲直到根节点,因为会超时; 所以采用重链剖分+线段树维护前缀最大值,复杂度O(nlogn*logn); #include <bits/stdc++.h> u 阅读全文
posted @ 2021-05-18 14:59
棉被sunlie
阅读(141)
评论(0)
推荐(0)
摘要:
题链 #include <bits/stdc++.h> using namespace std; #define LL long long #define ll long long #define ULL unsigned long long #define Pair pair<LL,LL> #de 阅读全文
posted @ 2021-05-18 13:58
棉被sunlie
阅读(48)
评论(0)
推荐(0)
摘要:
题链 学习自大型同性交友网站,这个B 站up主讲的非常好! 终于学会了第一个维护树上问题的方法,我好兴奋啊! #include <bits/stdc++.h> using namespace std; #define LL long long #define ll long long #define 阅读全文
posted @ 2021-05-18 13:20
棉被sunlie
阅读(45)
评论(0)
推荐(0)

浙公网安备 33010602011771号