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

神牛啊,膜拜一下,小草怎么搞都是3s多,郁闷……

Posted by wangjunyong at 2009-10-19 10:09:46 on Problem 3439
In Reply To:说一下自己做这题的经验 Posted by:JGGRonger at 2009-08-17 01:17:53
> 1.不要预处理,在BFS时再算,这样只需算和没有搜索的点的距离,减少了很多不必要的运算,而且节省了很多内存。据我的经验,两者之间起码差700+ms。
> 2.点的存储用int,在运算时再强制转换为double,这样大约能快200+ms。
> 这样两者结合,我的程序跑了250ms,唯一遗憾的是刷了n次都没刷到rank 1~~

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