OSDN Git Service
(root)
/
oi-wiki
/
main.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc6e2a5
)
Update mod-shortest-path.md
author
mgt
<mgt@oi-wiki.org>
Wed, 16 Sep 2020 07:03:02 +0000
(15:03 +0800)
committer
GitHub
<noreply@github.com>
Wed, 16 Sep 2020 07:03:02 +0000
(15:03 +0800)
docs/graph/mod-shortest-path.md
patch
|
blob
|
history
diff --git
a/docs/graph/mod-shortest-path.md
b/docs/graph/mod-shortest-path.md
index
6e7a30c
..
9e6acbf
100644
(file)
--- a/
docs/graph/mod-shortest-path.md
+++ b/
docs/graph/mod-shortest-path.md
@@
-11,13
+11,13
@@
不妨假设 $x < y < z$ 。
-令 $d_i$ 为只通过 **操作 2** 和 **操作 3** 能够达到的最低楼层 $p$ ,并且满足 $p\mod x=i$ 。
+令 $d_i$ 为只通过 **操作 2** 和 **操作 3** 能够达到的最低楼层 $p$ ,并且满足 $p\
b
mod x=i$ 。
可以得到两个状态:
-- $i \xrightarrow{y} (i+y) \mod x$
+- $i \xrightarrow{y} (i+y) \
b
mod x$
-- $i \xrightarrow{z} (i+z) \mod x$
+- $i \xrightarrow{z} (i+z) \
b
mod x$
注意通常选取一组 $a_i$ 中最小的那个数对它取模,也就是此处的 $x$ ,这样可以尽量减小空间复杂度(剩余系最小)。