|
|
4 ab ba aba bab answer: ababa My program got WA8 all the time. I have added next string to my program if(n>50) vector<long> xxx(1000000); and it got AC after that!!! Variable "xxx" never uses in my code! If i delete this line it got WA8!!!! Please, send your program to my e-mail hi. I have sent you my program about an week ago. So what was the problem? Can you send your solution for me:) I'll try to help also I guarantee that I'll help with any of my solved problems be shure I'll not cheat you;) Dear admin, I'm also facing problem on WA-8. Although the guide page says that "the input data of this test case is not available, the solution author should find the cause of the error on their own", I have no idea on what error my program has. So I'm seeking for your help, can I contact you using email? Even if in the statement it is said that: "Albanian dictionary, found exactly N different words S[i] in it", in test 24 there are identical words, so be careful at this particular case. I implemented BFS solution and getting WA6. Persons,who ACed now but had problems with this test in the past,please,tell me,what is the possible reason of failure? For russian-speakers: i implemented approach, which K@DR explained me here: http://e-maxx.ru/forum/viewtopic.php?id=313 Edited by author 19.11.2010 16:40if you have WA6, try this test 2 ab abab answer: YES abab But now I have problems with 8-th test:( Who can help me? if wa6, try this 4 ab ba aba bab YES ababa 3 abcab abc c YES abcabc There many ways: 1) hash 2) suffix array 3) suffix tree 4) suffix automation Thank you, I've got AC 10000 suffices,graph of they. Suffix s1 connected with suffix s2 if exist word s, adjusting which to s1 we will have s2 as a rest. BFS in graph to find when rest will be equal empty:1) s=s1+s2; s=s3+s1+s4;s2=s1+s4. Ac at last with above approach. It imortant to right work with 20000. Edited by author 22.11.2008 14:52 Create characters tree for all words (allowing direct per-character steps at O(1) and enumeration of all children also at O(1)). DP over IxJ, I - word number, J - suffix length. Cover these suffixes with other words till length delta become zero. I used Dijkstra for that because length can change arbitrarily. Start in words which contain some other word as a prefix. Edited by author 20.08.2008 11:11 What is this test? At first I had WA8. But then I change 20000->200000 and now WA 12. Who can help with this test? Thx. Can anyone tell me what's the trick of test9? Thanks Just stack over flow, noting special.... Contrary to your I think that test 9 very hard for it value 20000 is actual and I lost much bloode fighting with it. From the statement, words are not necessary different. So, am I right that for the input 2 ab ab output like YES ab is right? found exactly N different words S[i] in it and realized I think there are some bugs in my solution, but I got AC! Is that true that if there is an answer, there is an answer shorter than 20001 symbol? Otherwise the statement is a bit strange. what is the 8th test? thanks! |
|
|