|
|
вернуться в форумI use KMP algorithm but i've got TLE at #9 my code is: [code deleted] what can I improve? How did you solve-it? Edited by author 09.04.2011 20:54 You don't need KMP in this task. I can't even image how this algo helps to solve it. The solution is much more simple. Just find the least position for every word. I got AC even with std::string and the function str.find() Can you give me an example? How to use str.find() in c++? My email adress is catalin_oancea2008@yahoo.com Edited by author 12.04.2011 21:46 I have Wa 9. Can anybody help me ? try this: in: =========================== hhahaphapphappyhappyhh hap happ hh out: =========================== ___hap____happ______hh this test helps me to find a bug. thanks. |
|
|