Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:I get TLE~ isn

Posted by Grope at 2003-11-01 18:47:48 on Problem 1456
In Reply To:I get TLE~ isn't it o(n^2), i can't optimize it any more :( Posted by:xhope at 2003-11-01 17:03:47
There is an O(n) algorithm.
Using heap,you can get an O(nlogn) algorithm. 

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator