|
|
in second sample suffix tree ,you can't get suffix aa from root to leaf,in the picture... I think correct output of sample 2 is 16. I think correct output of sample 2 is 16. I managed to get rid of WA using these two test cases: in: 1 dcbbbdbdbbacaaaddbdcbbbdbbdbbadacbbaaddbaddbddacaa out: 15577 in: 1 abcccacccbcabaaaacbbabbcaaaaacaaaaacaacacbbacbcaba out: 15236 In test #23 it seems that n is large. So, to pass TLE #23, make sure your code is running fast enough for n = 100 000 and each test contains a single letter. Thanks to Alexander Kulkov for preparing! Спасибо за задачу!!! Очень интересная и полезная!!! А ещё такой вопрос, Вы можете сказать, сколько (в сек.) работает решение жюри? Привет. Напиши мне в ЛС на codeforces или на e-mail. Обсудим :) Edited by author 10.05.2016 22:50 |
|
|