摘要:
```cpp / 暴力可以st表维护线性基, 从而复杂度两个log 实际上我们可以离线来做, 并且记录可行最右值, 就是一个log的了 / include include include include include define ll long long define mmp make_pair
阅读全文
posted @ 2019-04-17 21:21
fastle
阅读(275)
推荐(0)
编辑
摘要:
```cpp / 思维难度几乎没有, 就是线段树分治check二分图 判断是否为二分图可以通过维护lct看看是否链接出奇环 然后发现不用lct, 并查集维护奇偶性即可 但是复杂度明明一样哈 / include include include include include define f1 fir
阅读全文
posted @ 2019-04-17 15:50
fastle
阅读(202)
推荐(0)
编辑
摘要:
```cpp / 经典思路, 倒序并查集处理即可 / include include include include include define ll long long define mmp make_pair define M 1000010 using namespace std; int
阅读全文
posted @ 2019-04-17 14:33
fastle
阅读(198)
推荐(0)
编辑
摘要:
```cpp /* 树上主席树能够求出链上第k大, 然后启发式合并直接重构就好了 卡常数就卡呗 反正我就暴力重构了!! */ #include #include #include #include #include #define ll long long #define mmp make_pair #define M 100010 using namespace std; int read()...
阅读全文
posted @ 2019-04-17 12:51
fastle
阅读(132)
推荐(0)
编辑
摘要:
把1的父亲设成了1导致debug半天 cpp / 惊奇的发现我不会写树上主席树QAQ 并不是进行链剖, 而是继承父亲, 然后根据主席树的可减性来求解 求lca可是还是要剖的 / include include include include include define ll long long d
阅读全文
posted @ 2019-04-17 08:10
fastle
阅读(138)
推荐(0)
编辑