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

memset跟for循环差不多吧,只是填充方式可能不一样

Posted by csulk at 2010-07-30 11:10:49 on Problem 2777
In Reply To:Re:实在不解,为什么visited[300000]进行memset时会严重超时!!纠结了一个下午,改为visited[40]后300+ms。。。 Posted by:zhanglongpan at 2010-05-18 22:24:19
你用memset一样要O(N)的循环。可能填充的时候是按位来填充。
个人看法。
不信的话你可以试试用for循环代替memset去试试时间性能。
如有误解,请指教

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