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:lvcheng at 2010-04-08 18:34:06 > 把素数表筛出来,然后二重循环头尾即可,有一个优化,注意到具有单调性,因此,枚举尾,维护头指针,可以做到线性求解,不过由于数据弱,好像两个都是0ms,呵呵~。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator