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:bsearch

Posted by win1611 at 2010-01-23 10:58:33 on Problem 2153
In Reply To:bsearch Posted by:20053565 at 2008-02-10 16:59:10
for(j=0;j<n-1;j++)
> 			for(k=j+1;k<n;k++)
> 			{
> 				if(s[k]>s[j])
> 				{
> 					t=s[j];
> 					s[j]=s[k];
> 					s[k]=s[j];
> 				}
> 				if(s[k]==s[j])
> 					s[k]=0;
> 			} 
TLE原因就在这里面,时间复杂度过大

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