|
|
back to boardI have AC. I am interested in another method of solution. http://ideone.com/06yGHW Maybe someone could improve that solution and get AC with it. Current status of that code is WA#8. I think it is quite boring and tedious to upgrade it to AC. Maybe you can see how to upgrade it with small effort. Re: I have AC. I am interested in another method of solution. Incredible, my code contained a mistake. Mistake was that I wrote not q=go[q]. next [ch], but simply go[q]. next [ch]. Strange enough, compiler didn't warned me about unused variable. Re: I have AC. I am interested in another method of solution. So, the problem can be solved using DFS+Trie in 15 ms. Edited by author 15.07.2017 21:56 Edited by author 15.07.2017 21:56 |
|
|