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:
12cc088
)
Update docs/dp/opt/state.md
author
mgt
<mgt@oi-wiki.org>
Tue, 26 Jan 2021 15:16:41 +0000
(23:16 +0800)
committer
GitHub
<noreply@github.com>
Tue, 26 Jan 2021 15:16:41 +0000
(23:16 +0800)
docs/dp/opt/state.md
patch
|
blob
|
history
diff --git
a/docs/dp/opt/state.md
b/docs/dp/opt/state.md
index
6f156f0
..
8c41baf
100644
(file)
--- a/
docs/dp/opt/state.md
+++ b/
docs/dp/opt/state.md
@@
-44,7
+44,7
@@
$$
???+note "题面"
给定一个 $n$ 个点的无权有向图,判断该图是否存在哈密顿回路。$(2\le n\le 20)$
-###
简单
的解法
+###
朴素
的解法
看到数据范围,我们考虑状压。
@@
-63,4
+63,3
@@
$$
我们可以考虑对于每个状态 $s$ 将 $f_{s,1},f_{s,2},\dots,f_{s,n}$ 压成一个 `int` ,发现我们可以将邻接矩阵同样压缩后进行 $O(1)$ 转移。
时间复杂度 $O(n\times 2^n)$ , 可以通过这道题。
-