library icon indicating copy to clipboard operation
library copied to clipboard

Slope Trick

Open ei1333 opened this issue 3 years ago • 3 comments

  • [x] return min f(x)
  • [x] f(x) += max(a - x, 0)
  • [x] f(x) += max(x - a, 0)
  • [x] f(x) += |x-a|
  • [x] f(x) += a
  • [x] f(x) = min f(y) (y <= x)
  • [x] f(x) = min f(y) (y >= x)
  • [x] f(x) = \min_{y \in [x-a,x-b]} f(y) スライド最小値
  • [x] f(x) = f(x - a) 平行移動
  • [x] f(x) += g(x) マージ (log1つならSplayTreeが必要)
  • [ ] return f(x) (平衡二分木が必要)
  • [ ] f(x) += b \times |x-a| (平衡二分木の切り張りでできそう)

他に思いつく操作 かいて

ei1333 avatar Apr 03 '21 12:04 ei1333

f(x) = min_t g(t) h(x-t) convolution

beet-aizu avatar Apr 03 '21 12:04 beet-aizu

https://github.com/tokoharu/tokoharupage/blob/master/docs/advent2019.pdf

ei1333 avatar Apr 07 '21 11:04 ei1333

https://twitter.com/noshi91/status/1381875703428227074

ei1333 avatar Apr 13 '21 08:04 ei1333