摘要: N皇后 dfs模板 点击查看代码 class Solution { private int ans; public int totalNQueens(int n) { boolean[] col = new boolean[n]; boolean[] diag1 = new boolean[n*2 阅读全文
posted @ 2024-12-02 10:53 TTDB 阅读(34) 评论(0) 推荐(0)