摘要:
dfs 1.P2036 #include<bits/stdc++.h> using namespace std; typedef long long int ll; int n; ll s[12]; ll k[12]; ll ans=1e9; void dfs(int dep,ll suan,ll 阅读全文
摘要:
bfs宽搜 1.走迷宫 #include<bits/stdc++.h> using namespace std; int g[110][110];//存图 int d[110][110];//d[i][j]存放的为从起点到(i,j)这个点的距离 int n,m; //针对东南西北走的问题一定要写变化 阅读全文
摘要:
Trie树 作用:高效存储和查找字符串的数据结构 #include<bits/stdc++.h> using namespace std; int idx;//下标 const int N=1e5; int cnt[N];//cnt[i]表示以i结尾的单词出现次数 int son[N][26];// 阅读全文