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:水水更健康!!!!!!!!!

Posted by john081201 at 2012-03-09 10:46:45 on Problem 3781
In Reply To:Re:水水更健康!!!!!!!!! Posted by:caojingkun886 at 2011-07-25 16:59:10
> #include<stdio.h>
> int maopao(int n,int a[])
> {
> 	int i,j,temp;
> 	for(i=0;i<9;i++)
> 		for(j=i+1;j<10;j++)
> 			if(a[j]<a[i])
> 			{
> 				temp=a[i];
> 				a[i]=a[j];
> 				a[j]=temp;
> 			}
> }
> int main()
> {
> 	int n,a[10],i,j,sum=0,m,next,temp,max=0;
> 	scanf("%d",m);
> 	while(m--){
> 	
> 	for(i=1;i<=m;i++)
> 	{
> 	scanf("%d",&n);
> 	for(i=0;i<10;i++)
> 	scanf("%d",&a[i]);	//这里没有把 输入序列号算进去 如第一行输入了1 你把它当a[0]了 题目没注意 小细节
> 	maopao(n,a);
> 	printf("%d %d\n",n,a[7]);
> 	m--;	
> }
> }
> }
> 这位兄台,可不可以帮我看看到底是怎么错了!55555

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