摘要: DFS 按行枚举 时间复杂度 \(O(n!)\) 点击查看代码 #include<iostream> using namespace std; const int N = 20; int n; char g[N][N]; bool col[N], dg[N], udg[N]; void dfs(in 阅读全文
posted @ 2022-05-04 23:04 wKingYu 阅读(50) 评论(0) 推荐(1)
摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 10; int n, path[N]; bool st[N]; void dfs(int u) { if (u > n) { for (int i = 1; i <= n; i 阅读全文
posted @ 2022-05-04 21:24 wKingYu 阅读(37) 评论(0) 推荐(0)