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

mafan daniumen le

Posted by momo at 2007-03-31 15:07:59 on Problem 2092
#include<stdio.h>
int xx[10002];
int main()
{
	int n,m,i,j,a,max,dier;
	while(scanf("%d%d",&n,&m)&&(n||m)){
		max=0;dier=0;
		for(i=0;i<10002;i++)xx[i]=0;
		for(i=0;i<n;i++)for(j=0;j<m;j++)
		{
			scanf("%d",&a);xx[a]++;
			if(xx[a]>max){dier=max;max=xx[a];}
		}
		for(i=0;i<10001;i++)if(xx[i]==dier){printf("%d",i);break;}
		for(i++;i<10001;i++)if(xx[i]==dier)printf(" %d",i);
		printf("\n");
	}
	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