My [code](https://judge.yosupo.jp/submission/197379) for [Enumerate Palindromes](https://judge.yosupo.jp/problem/enumerate_palindromes) passes all the cases.<br>↵
↵
But it has a fatal bug and should tle.<br><br>↵
↵
<spoiler summary="What is it?">↵
```c++↵
r = i + res[i];↵
b = i;↵
```↵
</spoiler>↵
↵
<spoiler summary="What it should be?">↵
↵
```c++↵
if (i + res[i] > r) {↵
r = i + res[i];↵
b = i;↵
}↵
```↵
</spoiler>↵
↵
↵
<spoiler summary="Generator for failing case">↵
↵
```c++↵
ll n = 1e5;↵
string s = "";↵
for (ll i = 0; i < n; i++) {↵
s += 'j';↵
s += 'k';↵
}↵
cout << s <<"\n";↵
```↵
</spoiler>↵
↵
[Correct Code](https://judge.yosupo.jp/submission/197382)
↵
But it has a fatal bug and should tle.<br><br>↵
↵
<spoiler summary="What is it?">↵
```c++↵
r = i + res[i];↵
b = i;↵
```↵
</spoiler>↵
↵
<spoiler summary="What it should be?">↵
↵
```c++↵
if (i + res[i] > r) {↵
r = i + res[i];↵
b = i;↵
}↵
```↵
</spoiler>↵
↵
↵
<spoiler summary="Generator for failing case">↵
↵
```c++↵
ll n = 1e5;↵
string s = "";↵
for (ll i = 0; i < n; i++) {↵
s += 'j';↵
s += 'k';↵
}↵
cout << s <<"\n";↵
```↵
</spoiler>↵
↵
[Correct Code](https://judge.yosupo.jp/submission/197382)