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:那这样做有什么问题呢??? Posted by:crackerwang at 2007-09-29 07:50:37 > sort(a,a+n); > i=0; > j=n-1; > while(k) > { > if(k>=2) > { > t1=a[i]*a[i+1]; > t2=a[j]*a[j-1]; > if(t1>=t2) > { > flag[i]=flag[i+1]=1; > i=i+2; > } > else > { > flag[j]=flag[j-1]=1; > j-=2; > } > k-=2; > } > else > { > flag[j]=1; > k=0; > } > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator