|
|
back to boardTLE10 Posted by PSV 26 Dec 2006 06:00 I make O(n^2*z) (z - time for updating hash table) algo to check if exist equal squares of some k-size. Then I make binary search by k. So complecity in worth case is O(n^3*log n) - so that is bad... But what to do - some ideas?.. Maybe goodhash function or doublize it, or there is much different approach? Re: TLE10 Posted by Kit 15 Feb 2007 22:40 Only thing you need is z = O(1). Edited by author 15.02.2007 22:43 Re: TLE10 Hash-based solution can be applied easily in O(N^2*logN). Even not very good hash can get AC because of weak tests for this problem... Re: TLE10 Posted by Kit 19 Feb 2007 16:44 What 'not very good' hash you mean? Can you describe it? Re: TLE10 Posted by R13 28 Apr 2007 21:06 Pasha, if you accept this ... help me to do this too! Good Luck! Chobit'my jiji, chobit'my!!! Re: TLE10 Posted by R13 28 Apr 2007 22:14 I have f..ed this problem! I did this problem the same as you did. my Modulo in hash table = 999983. |
|
|