int search(int x[], int n, int *count) { int i,m=*x; *count=1; for(i=0;i{ if(m<*(x+i)) { m=*(x+i); *count=1; } else if(m==*(x+i))(*count)++; } return m; } main() { int x[100],n,count,i; scanf("%d",&n); for(i=0;iprintf("%d %d\n",search(x, n, *count),count); }