正文
增加 1 行删除 1 行
48 行未改动49505152535455565762 行未改动48 行未改动void spl(int x){psa(x);for(;nrt(x);rot(x)){int y=f[x],z=f[y];if(nrt(y)) rot(x==s[y][1]^y==s[z][1]?x:y);}}void acc(int x){for(int y=0;x;x=f[y=x]) spl(x),rs=y,psu(x);}void mrt(int x){acc(x);spl(x);psr(x);}62 行未改动48 行未改动49505152535455565762 行未改动48 行未改动void spl(int x){psa(x);for(;nrt(x);rot(x)){int y=f[x],z=f[y];if(nrt(y)) rot(x==s[y][1]^y==s[z][1]?x:y);}}void acc(int x){for(int y=0;x;x=f[y=x]) spl(x),rs=y,psu(x);}void mrt(int x){acc(x);spl(x);psr(x);}62 行未改动