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

确实可以,算log确实花时间挺长的

Posted by limingfei at 2007-10-18 22:43:46 on Problem 3250 and last updated at 2007-10-18 22:44:12
In Reply To:不会超 Posted by:laisiwei at 2007-10-18 22:05:39
把log2(x)用数组存起来的:
2801814	limingfei	3250	Accepted	16600K	575MS	G++	2174B	2007-10-18 22:36:18

直接用log2(x)算的
2801831	limingfei	3250	Accepted	16284K	903MS	G++	2189B	2007-10-18 22:39:17

用log(x) / log(2)算的
2801837	limingfei	3250	Time Limit Exceeded			G++	2196B	2007-10-18 22:41:50

以前都不知道有log2这个函数,看来以后写RMQ都要把log2(x)存起来……

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