mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-26 13:06:07 +00:00
build
This commit is contained in:
@@ -26,7 +26,7 @@ comments: true
|
||||
|
||||
也就是說,我們可以採取逐行放置策略:從第一行開始,在每行放置一個皇后,直至最後一行結束。
|
||||
|
||||
圖 13-17 所示為 $4$ 皇后問題的逐行放置過程。受畫幅限制,圖 13-17 僅展開了第一行的其中一個搜尋分支,並且將不滿足列約束和對角線約束的方案都進行了剪枝。
|
||||
圖 13-17 所示為 4 皇后問題的逐行放置過程。受畫幅限制,圖 13-17 僅展開了第一行的其中一個搜尋分支,並且將不滿足列約束和對角線約束的方案都進行了剪枝。
|
||||
|
||||
{ class="animation-figure" }
|
||||
|
||||
@@ -269,6 +269,7 @@ comments: true
|
||||
|
||||
}
|
||||
*res = append(*res, newState)
|
||||
return
|
||||
}
|
||||
// 走訪所有列
|
||||
for col := 0; col < n; col++ {
|
||||
|
||||
Reference in New Issue
Block a user