摘要:
dfs 定义string数组初始化后加; char型 - ‘0’转为int型 class Solution { public: vector<string> res; string path; const string map[10] = { "", "", "abc", "def", "ghi", 阅读全文
posted @ 2022-09-02 16:37
hjy94wo
阅读(23)
评论(0)
推荐(0)
摘要:
dfs class Solution { public: vector<int> path; vector<vector<int>> res; void dfs(int start, int n, int k) { if (path.size() == k) { res.push_back(path 阅读全文
posted @ 2022-09-02 16:11
hjy94wo
阅读(17)
评论(0)
推荐(0)
摘要:
DFS AcWing 842. 排列数字 #include <iostream> using namespace std; const int N = 10; int n; int path[N], st[N]; void dfs(int u) { if (u == n) { for (int i 阅读全文
posted @ 2022-09-02 15:33
hjy94wo
阅读(70)
评论(0)
推荐(0)
摘要:
const int N = 20; class Solution { public: vector<vector<string>> res; bool col[N], dg[N], udg[N]; void dfs(int u, int n, vector<string>& path) { if ( 阅读全文
posted @ 2022-09-02 15:29
hjy94wo
阅读(16)
评论(0)
推荐(0)