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

但我同学有用string过的,时间是3600ms左右,而且他是用Map+dfs(dfs用来判连通)

Posted by caizhicong0503 at 2008-08-04 20:06:56 on Problem 2513
In Reply To:Re:大家帮忙看看,Map+并查为什么超时??? Posted by:sunmoonstar at 2008-08-04 18:11:47
> Hint
> 
> Huge input,scanf is recommended.
> 
> 用string不行


但我同学有用string过的,时间是3600ms左右,而且他是用Map+dfs(dfs用来判连通)
我个人认为dfs比并查集还要慢,这样看来应该跟string没关系吧

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