Олег Бовсуновский
A1zberg
Ukraine
Qoşuldu 19 iyl 2014
Məsələlər1008
Təqdimatlar1168
Pay attention to the "4 2 4" from first example, 2 4 is "a$" vertex.
Similar in last example "7 3 6" for "ba$".
It's from Winter school 2013 http://2013.ws.kh.ua/lang/en/ http://2013.ws.kh.ua/media/sbornik/Sbornik2013.pdf
Described that it should be solved with online Ukkonen's algorithm because it works by adding one character to the tree and know the length of not unique suffix, which gives answer for second query type.
But I'm still not able to get 100%.