Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

15MS过,,谈谈我的思路.顺便给RE..TEL,..WA的同学一些数据....

Posted by zzyzzy12 at 2010-08-23 16:33:46 on Problem 2689
data:

2146483648 2147483647
2146483811,2146483813 are closest, 2146841093,2146841273 are most distant.
1 2
There are no adjacent primes.
1 100
2,3 are closest, 89,97 are most distant.

---------------------------------------------------------------------
首先找出并将2~2^16的素数存在一数组中..然后在L...U中用这些素数以筛选法删除掉所有合数..最后扫描判断最近最远即可..

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator