|
|
2 jsesi jesfi 2 tvtx vtix 2 qfqejjfhrhono fqwejjfhrhono 2 mciqibekphze mcqibmekphze 2 affjoromdta affjromjdta all answers should contain both strings Yes. First test is sample. I check it!) //WA 2: )) Console.WriteLine(@"5 moina morna palpa papa pella"); Just wrong sort in my program. I've got TLE on 7st test. I use Ukkonen algorithm for comparing pairs of strings (it does O(2*m) time) and O(n*(n+1)/2) for excess all pairs. So, it must be O((5000+1)*2500*15*2) time. Isn't it enough? There is a much simplier solution with the same complexity, and with less constant To [SPbSU ITMO] WiNGeR : Do you use any input filters before an algorithm of O(n^2)? (For example The difference in the length of compared words mustn't be more than 2. Sets of symbols of two words cann't consist of more than 4 different symbols. Or anything else? ) Mine solution is almost same... get's TLE on 6th test. I've tried that "dirty" tricks (as length checking) before difference calcultion beetwen words. It seems that it's unsolvable on JAVA (noone has got AC in JAVA, i watched :) ) Mb will write same on CPP... There is much faster O(n) check. Just one for and some if. However i write in CPP :) Please, give me a hint about this test This test helped me passed 7 test. Hope, it will help you too: 2 combo cobra Answer is 0. And this is just good test: 2 cooa combo The answer is 0. GOOD LUCK! Thanks, my friend) AC at last)) I should be more attentive) Edited by author 21.08.2007 17:06 2 aaa cabaa One more test. answer is 2. But it didn't helped me :( Test 1: 2 aaabaaaaabaaaaa aaaabaaaaabaaaa ans: 2 aaaabaaaaabaaaa aaabaaaaabaaaaa Test 2: 2 abcdef absdf ans: 2 abcdef absdf At least at helped me =) My Pascal code in Free Pascal compiling - not error. ID = 1569544 Help my, please... === Answer in FAQ. Thank. Edited by author 11.03.2007 10:13 New tests have been added, AC submissions have been rejudged, 7 authors lost AC. What is the correct answer for this test: 4 aaaaaa bbaaaa bbccaa bbccdd Does it contain 3 or 4 words? What an answer for the test: 2 abcde bcdeh I think: 2 abcde bcdeh When the answer will be 1? My prog has WA#4 But I do not understend why. Help me! Give some test GL ;) I thihk that the problem has interesting feature. Relation in it is tolerance and not an order , therefore ordered structures:trees,sets,dictionaries unapplicable. 3 aaab acaa bcba What is the answer? I think the right answer is 3 aaab acaa bcba I think it could bi 2 or 1 because 2 aaab bcba and one if we choose 1 acaa there are exactly 2 diferences My AC-program says 3 aaab acaa bcba GL! what's the containt of the second test Edited by author 03.03.2007 17:00 Timelimit for java is 4 seconds like c++, but java is slower than c++. Can you increase TL for java? why did "pella" is included? |
|
|