正文
增加 2 行删除 2 行
21 行未改动222324252627282930123 行未改动全部展开15415515615715815916016116297 行未改动21 行未改动具体还有细节需要注意。上代码。(理论复杂度并不慢,只是我自带大常数。)```cpp#include<cstdio>#include<iostream>#include<queue>123 行未改动全部展开return;hp2.ROOT=hp2.Del(fx);hp2.ROOT=hp2.Del(fy);int z=hp1.Merge(fx,fy);hp2.Add(z,hp1.e[z].val+hp1.mark[z]);}void Addpoint(int x,int v){int fx=hp1.getroot(x);97 行未改动21 行未改动222324252627282930123 行未改动全部展开15415515615715815916016116297 行未改动21 行未改动具体还有细节需要注意。上代码。(理论复杂度并不慢,只是我自带大常数。)```cpp#include<cstdio>#include<iostream>#include<queue>123 行未改动全部展开return;hp2.ROOT=hp2.Del(fx);hp2.ROOT=hp2.Del(fy);int z=hp1.Merge(fx,fy);hp2.Add(z,hp1.e[z].val+hp1.mark[z]);}void Addpoint(int x,int v){int fx=hp1.getroot(x);97 行未改动