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 |
Re:483B优化不动了 求大牛优化In Reply To:483B优化不动了 求大牛优化 Posted by:Sayakiss at 2010-06-26 16:37:26 > # include<stdio.h> > int n,q,m,a,f[999],s; > int main() > { > while (scanf("%d%d",&n,&q),n!=0) > { > for (s=800;s>0;s--) f[s]=0; > while (n--) > { > scanf("%d",&m); > while (m--) > { > scanf("%d",&a); > f[a]++; > } > } > for (m=0;m<800;m++) if (f[m]>=q&&f[m]>f[s]) s=m; > printf("%d\n",s); > } > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator