@[Neutralized](/user/538609) 多测没清空。
by lingfunny @ 2022-06-12 21:37:20
@[lingfunny](/user/280800) 请问具体是哪里没清空啊\fad
那个 `relive()` 函数里面把除了ST表的所有数组都清了((
by Neutralized @ 2022-06-12 21:39:43
@[Neutralized](/user/538609) 具体是哪没清我也没咋看,反正数据挺水的,直接 `memset` 也不会错。
`void relive()` 我改成下面这玩意了:
```cpp
#define cl(a) memset(a, 0, sizeof(a))
void relive(){
cl(a); cl(b); cl(s);
cl(sa); cl(rk); cl(bac); cl(y);
cl(Log); cl(st); cl(ht);
lena = lenb = tlen = res = tot = 0;
}
```
by lingfunny @ 2022-06-12 21:39:58
@[lingfunny](/user/280800) 我凑,谢谢(((
srds,为什么用 `for` 会RE啊(恼
by Neutralized @ 2022-06-12 21:42:17
看来以后都用 `fill` 和 `memset` 了(,草
by Neutralized @ 2022-06-12 21:42:41
@[Neutralized](/user/538609) 真相了,,,你清的不够多。
跑 SA 最多会访问到 $n+m$,你只清了 $n$。
改成下面这个:
```cpp
void relive(){
for(ri i = 0; i <= tlen + 86; ++i)
bac[i] = y[i] = 0;
res = tot = lena = lenb = tlen = 0;
}
```
by lingfunny @ 2022-06-12 21:48:57
@[lingfunny](/user/280800) 啊这,好像懂了,谢谢
by Neutralized @ 2022-06-12 22:03:42