萌新 求助

P3369 【模板】普通平衡树

@[zh_dou](/space/show?uid=123081) @[wlj_dy](/space/show?uid=153843) @[__wfx](/space/show?uid=162451) @[不败丶流逝](/space/show?uid=151768) @[灼眼的夏娜](/space/show?uid=160654)
by Treaker @ 2019-09-22 14:15:34


但我当我恒定让x转到根时,这样写是对的。 ```cpp inline void splay(node *x) { while(x != root) { if(x -> fa != root) rot(x -> isr() ^ x -> fa -> isr() ? x : x -> fa); rot(x); } } ``` 为什么呢?
by Treaker @ 2019-09-22 14:16:54


难道goal和root有什么区别吗?还是说goal应该传地址?
by Treaker @ 2019-09-22 14:17:57


@Treaker%%%%%
by __wfx @ 2019-09-22 14:18:56


QNMDMX
by 流逝丶 @ 2019-09-22 14:19:07


@[Treaker](/space/show?uid=153898) 我不会 您太巨了
by __wfx @ 2019-09-22 14:19:42


我需要一个科学的回答 。。
by Treaker @ 2019-09-22 14:20:25


~~去***萌新~~
by __wfx @ 2019-09-22 14:20:36


@[NaCly_Fish](/space/show?uid=115864)
by Treaker @ 2019-09-22 14:21:05


你问我指针。。。。
by 灼眼的夏娜 @ 2019-09-22 14:21:14


| 下一页