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

判断连通分量是否一致。。。参照一个大神的。思路。但是不解为了啥。有人能探讨一下为啥么?

Posted by 274856653 at 2019-09-26 22:07:41 on Problem 1175
思路:用Hash表存储不同的连通块,求出连通分量点的x和y的平均值。以每个点到平均值差的四次方作为哈希值
为啥是四次方。我想当然的认为是2次方也行。结果不对
 1
111
 1
11
111如果平方是错误。

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