|
|
back to boardTLE 9 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 Re: TLE 9 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() Re: TLE 9 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 WA 9 Posted by Zhandos 13 Apr 2011 12:17 I have Wa 9. Can anybody help me ? Re: WA 9 try this: in: =========================== hhahaphapphappyhappyhh hap happ hh out: =========================== ___hap____happ______hh Re: WA 9 this test helps me to find a bug. thanks. |
|
|