那个t是错误那一行所在
by 低熵体 @ 2019-07-13 20:09:52
把freopen等全部弄对后只有68分
by 低熵体 @ 2019-07-13 20:17:30
~~小心被lxl怒斥~~
by 142857cs @ 2019-07-13 20:45:34
@[142857cs](/space/show?uid=35760) ???
by 低熵体 @ 2019-07-13 20:46:50
@[低熵体](/space/show?uid=116683) 据说lxl认为SBT是假东西
by 142857cs @ 2019-07-13 20:58:58
@[142857cs](/space/show?uid=35760) 还有这种操作?
by 低熵体 @ 2019-07-13 21:05:48
话说SBT真的快吗?今天蒟蒻学了替罪羊树,加个优化跑的比treap还快
by WAutomaton @ 2019-07-14 10:36:01
另外为什么对称代码不写一起呢?比如lRotate和rRotate可以写成这样:
`inline void rotate(int& p,int d)
{int c=ch[p][d];ch[p][d]=ch[c][d^1];ch[c][d^1]=p;pushup(p);pushup(c);p=c;
}`,其中`ch[p][0]`为左儿子,`ch[p][1]`为右儿子,`pushup`维护`size`,d=0表示把左儿子旋上来
by WAutomaton @ 2019-07-14 10:41:19
代码挂了,重新写下:
```cpp
inline void rotate(int& p,int d)
{
int c=ch[p][d];
ch[p][d]=ch[c][d^1];
ch[c][d^1]=p;
pushup(p);pushup(c);
p=c;
}
```
by WAutomaton @ 2019-07-14 10:43:12
@[低熵体](/space/show?uid=116683)
by WAutomaton @ 2019-07-14 10:44:12