Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
HELP 这样求最大最小值有错吗?? 怎么看也没错呀?谁能说说,不胜感激!!!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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator