只要找到每个位置往前最短的形如 $rrr$ 的后缀,和往后最短的形如 $tt$ 的前缀即可。可以用各种方式枚举 Runs 做到,例如后缀数组。
QOJ.ac
QOJ
The 3rd Universal Cup Finals is coming! Join our Warm-up Game and Prediction Game and win the prizes! Learn more...
Discussion #1487 for Problem #17423. Find ''rururutata''
Type: Editorial
Status: Open
Posted by: jiangly
Posted at: 2026-04-09 18:06:46
Last updated: 2026-04-09 18:06:51
题解
Comments
No comments yet.