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

HELP 这样求最大最小值有错吗?? 怎么看也没错呀?谁能说说,不胜感激!!!

Posted by zhzz at 2008-08-08 10:56:52 on Problem 2092
maxp=0;
		for(i=0;i<n;i++)
		{
			scanf("%d",&m);
			a[m]++;
			if(a[m]>maxp)maxp=a[m];
		}
		secp=0;
		for(i=1;i<10001;i++)
		{
			if(a[i]>secp && a[i]!=maxp)secp=a[i];
		}
                for(i=1;i<1001;i++)
		{
			if(a[i]==secp)printf("%d ",i);
		}
		printf("\n");



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