回溯法
DIDCJS
自律给予自由
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Uva 524 Prime Ring (素数环)
有什么问题评论问,必回!!!!代码如下:#include #include #include #include #include #include #include #include #define max 16*16+5using namespace std;int isp[max],vis[max],A[max];int n,rows=0;原创 2016-05-17 21:04:52 · 525 阅读 · 0 评论 -
Uva 129 Krypton Factor(困难的串)
运用回溯法,是否包含两个相邻的的字串只需要判断当前串的后缀代码如下:#include #include #include #include #include #include #include #include using namespace std;int n,l,cnt,times=0;int A[99];int dfs(int cur){原创 2016-05-18 22:05:41 · 583 阅读 · 0 评论
分享