F.A.Qs Home ProblemSet Status Ranklist Contest LoginRegister
Notice:1:五月份月赛定于5.27日12:30--17:30,欢迎大家来玩! 2:关于OJ的注册可看https://www.lydsy.com/JudgeOnline/wttl/thread.php?tid=5671
大视野在线测评-欢迎您
[ New Thread ]
Problem 3676 >> 回文自动机写法的一个小坑
Izumihanako @ 2017-12-13 11:16:04
[ Quote ] [ Edit ] [ Delete ] 1#
首先要构建回文自动机
me是指针写法,自底向上更新cnt的时候需要先用BFS预处理
因为同层下,偶数长度节点的fail可能连向奇数长度节点,所以BFS时要先把"root-1"入队,再把"root0"入队
Lazer2001 @ 2017-12-18 21:07:06
[ Quote ] [ Edit ] [ Delete ] 2#
-_-
iloi @ 2017-12-22 13:51:00
[ Quote ] [ Edit ] [ Delete ] 3#
(ಡωಡ)
[Top] [Previous Page] [Next Page]

HOME Back