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

有3个注意的点

Posted by a280920481 at 2019-07-14 12:25:07 on Problem 3237 and last updated at 2019-07-14 12:27:37
1.如果把边拆成点做的,那么原来的点的最大值初始化为-inf(不要初始化成INT_MIN, 因为补码取负后会变成0), 最小值初始化成inf, 而不能都初始化成0, 代表边的点的权值初始化为边权即可。


2.区间更新中, 更新延迟标记的时候注意, 一个区间被反转2次等效于没反转, 故标记的更新要以取反的方式, 而不是更新为true


3.单点更新, 要从上往下一层层push_down标记(我是这样做的, 直接找到对应节点push_up不知道对不对)

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