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

Re:把五组数字分成两拨,一拨三个,一拨两个,前一拨o(100^3)打表,离散化后,对第二拨处理,从表中二分查找值,总共o(100^3+100^2*log(100^3)),算水过吧

Posted by xietc at 2011-04-14 18:26:51 on Problem 1840
In Reply To:Re:把五组数字分成两拨,一拨三个,一拨两个,前一拨o(100^3)打表,离散化后,对第二拨处理,从表中二分查找值,总共o(100^3+100^2*log(100^3)),算水过吧 Posted by:AKsoftware at 2010-11-24 00:15:52
> 很显然先打表为50*100*100;然后50*100
唔,本人用这种用法,4000MS水过
注意,哈希数组用质数,像我以前用2000000这个合数总超时,但改用2097159后,可以了!

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