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 |
情况真多,一不小心就错了!我的思路,供参考……牛人请无视我~ /* 算法1:当不为正数时候,若k为奇数,则取最大的k个;否则,取最小的k个 2:有正有负或全为正的时候,若k为奇数,先取最大的正数,然后从两头开始 每两个的取,并选之中乘积较大的两个,若K为偶数,从两头开始 每两个的取,并选之中乘积较大的两个*/ Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator