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

贴了

Posted by sy123456 at 2011-05-10 16:14:30 on Problem 3325
In Reply To:不说了,直接贴代码 Posted by:bjtu1 at 2009-03-24 23:48:28
> #include<stdio.h>
> #include<stdlib.h>
> 
> 
> int main()
> {
> 	int n,m,data;
> 	int sum,min,max;
> 
> 
> 	while(scanf("%d",&n)!=EOF){
> 		if(n==0)
> 			return 0;
> 		m=n;
> 		sum=0;
> 		min=0x5ffffff;
> 		max=-1;
> 		while(m--){
> 			scanf("%d",&data);
> 			sum+=data;
> 			if(min>data)
> 				min=data;
> 			if(max<data)
> 				max=data;
> 		}
> 
> 		printf("%d\n",(sum-min-max)/(n-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