P4745 [CERC2017]Gambling Guide

Problem


\(1 \le n,m \le 300000\)

Solution

考虑设\(dp_x\)\(x\)\(n\)的最小硬币期望值。

  • \(dp_n = 0\)
  • \(dp_x = \left(\sum \min\{dp_v,dp_x\}\right) \cdot \dfrac{1}{deg_x} + 1\)
    然后搞搞。
posted @ 2021-08-16 10:00  luyiming123  阅读(28)  评论(0编辑  收藏  举报