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

为什么总是Runtime error 求帮助

Posted by 0908060048 at 2012-10-20 10:51:19 on Problem 2388
#include <stdio.h>
int main()
{
	int a,b[1000],i,p,j,temp;
	scanf("%d",&a);
	for(i=0;i<a;i++)
		scanf("%d",&b[i]);    	
	for(p=0;p<a;p++)
	{
		for( j=a-1;j>p;j--)
			if(b[j]<b[j-1])
			{
				temp=b[j-1];
				b[j-1]=b[j];
				b[j]=temp;
			}

	}
	printf("%d\n",b[a/2]);   
         return 0;
}

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