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 |
现在改过来了,可是还是错啊.?In Reply To:Re:能帮我看看有什么情况没有考虑到么? Posted by:xfxyjwf at 2006-03-13 19:03:20 #include"stdio.h" #include"string.h" main(){ int a,b,i,j,m,r,z=0,k; double n,t; char d[500],c[500],e[500]; while(scanf("%d %d",&a,&b)==2){ if(a==0)break; z++; t=0.0;r=0; for(i=0;i<a;i++){ fflush(stdin); gets(d); } for(j=0;j<b;j++){ fflush(stdin); gets(c); scanf("%f %d",&n,&m); if(m>r){ strcpy(e,c); t=n; r=m; } else if(m==r){ if(n<t){ t=n; strcpy(e,c); } } for(k=0;k<m;k++){ fflush(stdin); gets(d); } } printf("RFP #%d\n%s\n\n",z,e); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator