|
|
вернуться в форумJudges, does solution exist for JAVA? Послано Smog 5 апр 2007 22:04 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? Re: Judges, does solution exist for JAVA? There is a much simplier solution with the same complexity, and with less constant Re: Judges, does solution exist for JAVA? 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? ) Re: Judges, does solution exist for JAVA? 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... Re: Judges, does solution exist for JAVA? Послано Lomir 24 ноя 2007 23:51 There is much faster O(n) check. Just one for and some if. However i write in CPP :) Re: Judges, does solution exist for JAVA? YES!!! |
|
|