time limit exceeded on O(n) Z-func in problem below

Правка ru1, от SirodgevAlexander_, 2024-02-11 12:49:35

Hello!

I have TLE on 23 test with O(n) (I think so) Z-function. I want to reverse origin string and just use Z-func. Where is the problem?

[submission:245796377]

[problem:https://codeforces.net/edu/course/2/lesson/3/4/practice/contest/272262/problem/D]

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
ru5 Русский SirodgevAlexander_ 2024-02-11 12:54:12 1163
ru4 Русский SirodgevAlexander_ 2024-02-11 12:53:16 18
ru3 Русский SirodgevAlexander_ 2024-02-11 12:52:39 4 Мелкая правка: 'n(s);\n\n}~~~~~\n\n[' -> 'n(s);\n\n}\n\n~~~~~\n\n['
ru2 Русский SirodgevAlexander_ 2024-02-11 12:52:13 1177
ru1 Русский SirodgevAlexander_ 2024-02-11 12:49:35 314 Первая редакция (опубликовано)