| ||||||||||
| 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:终于找到陷阱了!哈哈!In Reply To:终于找到陷阱了!哈哈! Posted by:ygx2468 at 2008-09-03 22:12:09 > 一直TLE,原来快拍在n组区间完全一样的时候退化了,超时!改成stl的sort就过了。嘿嘿
对于这种情况,一般在快排的时候可以随机选一下主元,但是OJ不容许time()类的函数,所以只要选择中间那个元素就可以了。
我就是这样AC的
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator