|
|
back to boardShow all messages Hide all messagesWhat's test 9. I've got WA too. Try these tests: 3 3 2 ABC AB BC the answer is 16. 2 6 1 AB ABAB the answer is 53. I had WA#9 as well. My DFA was too primitive. Think about cases, when some word's prefix is contained in other word. For example, "dabc" and "abd" -- "ab" is prefix of "abd" and is contained in "dabc". It would be nice, if automaton can recognize words like "dabd". Regards, Denis Firsov tests: 2 4 3 ab abab abb baa answ:7 6 6 2 abcdef dabcab abdef answ:46643 Edited by author 30.03.2015 09:25 Edited by author 31.03.2015 06:18 |
|
|