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:哪位高手帮我看一下啊,提交好多次都是WA

Posted by nightelf at 2007-08-28 13:32:02 on Problem 1007
In Reply To:哪位高手帮我看一下啊,提交好多次都是WA Posted by:270987650 at 2007-08-27 17:54:13
这一段是排序吧,写错了~~~
j = 0时
地址越界了
> 	   for(m=0;m<N;m++)
> 	   {
> 		   for(int j=0;j<N-m;j++)
> 		   {
> 			   int t;
> 			   if(b[j]<b[j-1])
> 			   {
> 				   t=b[j-1];
> 				   b[j-1]=b[j];
> 				   b[j]=t;
> 			   }
> 		   }
> 	   }


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