ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1164. Fillword

I have AC. I am interested in another method of solution.
Posted by Mahilewets 15 Jul 2017 20:45
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.
Posted by Mahilewets 15 Jul 2017 21:55
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.
Posted by Mahilewets 15 Jul 2017 21:56
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