Follows 484.c (Total 21 lines):

/* @JUDGE_ID:4461XX 484 C */
/* A */
#include<stdio.h>
void main( void )
{
	int arr[16000][2] , i , j , k , ans ;
	for( i=0 ; ; i++ ){
		if( scanf( "%d" , &arr[i][0] ) != 1 ) break ;
		else arr[i][1] = 0 ;
	}
	for( j=0 ; j<i ; j++ )
		if( !arr[j][1] ){
			ans = 0 ;
			for( k=j ; k<i ; k++ )
				if( arr[k][0] == arr[j][0] ){
					ans++ ;
					arr[k][1] = 1 ;
				}
			printf( "%d %d\n" , arr[j][0] , ans ) ;
		}
}

Back to statistics
Ya-Lin Huang (C)
huangyl@gmail.com