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

怎么做到0MS呢?

Posted by ngn999 at 2009-04-09 17:33:51 on Problem 1611
按传统的并查集做出来的是16MS
设置一个count[MAX]
来统计每一棵树上的结点数,
再把init()写到main里,不做成函数,相当于宏的效果.
还是16MS

我刚开始看并查集的东西,不知道还有什么好的办法呢?

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