Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re: Your algorithm is OK.In Reply To:i can't reduce time longer! Posted by:azurespace at 2007-06-25 19:40:25 > > to solve this problem, I used Indexed tree recorded sorted sequences. > > for example) > > level 0) [1, 2, 3, 4, 5, 6, 7, inf] > level 1) [1, 2, 5, 6] [3, 4, 7, inf] > level 2) [1, 5] [2, 6] [3, 7] [4, inf] > level 3) [1] [5] [2] [6] [3] [7] [4] [inf] > > [...] stand for a node of indexed tree. > > it works, but not enough. therefore, i got TLE. > > how can i reduce execution time? Your algorithm is OK, use Merge Sort to to sort sequences between levels. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator