Difference between revisions of "2018 Multi-University, HDU Day 2"

From EOJ Wiki
Jump to navigation Jump to search
(Created page with "== Problem D == Solved by ultmaster. 00:16 (+) == Problem E == Solved by zerol. 02:06 (+1) == Problem G == Solved by kblack. 00:39 (+1) == Problem J == Solved by zerol....")
 
Line 10: Line 10:
  
 
Solved by kblack. 00:39 (+1)
 
Solved by kblack. 00:39 (+1)
 +
 +
题意:给出排列 $b_i$,对 $a_i$ 区间 $+1$,维护 $\lfloor \frac{a_i}{b_i} \rfloor$,区间求和。
 +
 +
题解:注意到 $b_i$ 是一个排列,每个位置总计最多 $+q$,值会总共最多变化次数是对数级的,故只要线段树记录 $ a_i - (a_i \bmod b_i) $,对于要突变的值暴力维护即可。
  
 
== Problem J ==
 
== Problem J ==
  
 
Solved by zerol. 00:14 (+1)
 
Solved by zerol. 00:14 (+1)

Revision as of 09:45, 25 July 2018

Problem D

Solved by ultmaster. 00:16 (+)

Problem E

Solved by zerol. 02:06 (+1)

Problem G

Solved by kblack. 00:39 (+1)

题意:给出排列 $b_i$,对 $a_i$ 区间 $+1$,维护 $\lfloor \frac{a_i}{b_i} \rfloor$,区间求和。

题解:注意到 $b_i$ 是一个排列,每个位置总计最多 $+q$,值会总共最多变化次数是对数级的,故只要线段树记录 $ a_i - (a_i \bmod b_i) $,对于要突变的值暴力维护即可。

Problem J

Solved by zerol. 00:14 (+1)