menu zcmimi's blog

arrow_back 仙人掌

```cpp

include<bits/stdc++.h>

namespace ZDY{

#pragma GCC optimize(3)
#define il __inline__ 
zc
2020-01-28 17:08

所有环的siz+1的乘积,注意要高精度 ```cpp

include<bits/stdc++.h>

namespace ZDY{

#pragma GCC optimize(3)
zc
2020-01-28 01:23

求仙人掌直径 ```cpp

include<bits/stdc++.h>

namespace ZDY{

#pragma GCC optimize(3)
#define il __in
zc
2020-01-28 01:17

建完广义圆方树后用树链剖分+线段树维护

修改一个点的时候,考虑到要修改它所在的双连通分量中的点,我们可以在(它的父亲)方点建一个对顶堆来维护最小值 ```cpp

include<bits/stdc

zc
2020-01-27 18:12

根据仙人掌图构建圆方树

若两个点的lca是原图的点,那么直接d_x+d_y-2\times d_{lca(x,y)}

否则就是两个点到环的距离加上两个点在环上的最短距离 ```cpp

inc

zc
2020-01-26 22:12

```cpp

include

pragma GCC optimize(3)

define il inline attribute ((always_inline)

zc
2020-01-25 20:19
1 / 1
Search
search