![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM_搜索
DATELOST
I'm curious.
展开
-
POJ-3074 Dancing Links精确覆盖
题目 行(所有情况)81个格子 * 9个数字=9^3 列(限制条件) 1.每个格子放一个数-81 2.行限制-9行 * 9个数字 3.列限制-9列 * 9个数字 4.小宫格限制-9个小宫格 * 9个数字 把限制条件插入,dancing… 剪枝:先选择数字多的列 #include<stdio.h> #include<string.h> using namespace std...原创 2020-03-21 21:57:48 · 172 阅读 · 0 评论 -
POJ-2449 A* bfs
Description “Good man never makes girls wait or breaks an appointment!” said the mandarin duck father. Softly touching his little ducks’ head, he told them a story. “Prince Remmarguts lives in his kin...原创 2019-08-27 23:58:16 · 119 阅读 · 0 评论 -
POJ-1915 双向bfs
Description Background Mr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move knights from one position to another so fast. Can you beat him? The Problem Your task is to ...原创 2019-08-26 12:40:44 · 239 阅读 · 0 评论 -
POJ-3322 bfs
Description Little Tom loves playing games. One day he downloads a little computer game called ‘Bloxorz’ which makes him excited. It’s a game about rolling a box to a specific position on a special pl...原创 2019-08-22 19:47:53 · 221 阅读 · 0 评论 -
POJ-2248 迭代加深搜索
Description An addition chain for n is an integer sequence with the following four properties: a0 = 1 am = n a0 < a1 < a2 < … < am-1 < am For each k (1<=k<=m) there exist two (not...原创 2019-08-15 17:48:03 · 127 阅读 · 0 评论 -
ACwing-171. 送礼物 双向搜索
达达帮翰翰给女生送礼物,翰翰一共准备了N个礼物,其中第i个礼物的重量是G[i]。 达达的力气很大,他一次可以搬动重量之和不超过W的任意多个物品。 达达希望一次搬掉尽量重的一些物品,请你告诉达达在他的力气范围内一次性能搬动的最大重量是多少。 输入格式 第一行两个整数,分别代表W和N。 以后N行,每行一个正整数表示G[i]。 输出格式 仅一个整数,表示达达在他的力气范围内一次性能搬动的最大重量。 数据...原创 2019-08-20 20:07:06 · 184 阅读 · 0 评论 -
POJ-3279 状压 搜索
Description Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M × N grid (1 ≤ M ≤ 15...原创 2019-03-17 23:56:45 · 269 阅读 · 0 评论 -
HDU-1043 逆向bfs 打表
Problem Description The 15-puzzle has been around for over 100 years; even if you don’t know it by that name, you’ve seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 o...原创 2019-03-11 23:03:24 · 211 阅读 · 0 评论 -
HDU-1238 Substrings stl的运用
这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 欢迎使用Ma...原创 2019-01-22 22:19:41 · 169 阅读 · 0 评论 -
HDU-1258 DFS hash去重
Problem Description Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t=4, n=6, and the list is [4,3,2,2,1,1], th...原创 2019-02-10 19:20:10 · 145 阅读 · 0 评论 -
HDU-1045 DFS
题目 Sample Input 4 . X . . . . . . X X. . . . . . 2 XX . X 3 . X . X.X . X . 3 . . . .XX .XX 4 . . . . . . . . . . . . . . . . 0 Sample Output 5 1 5 2 4 代码: #include<bits/stdc++.h> using namespac...原创 2019-02-10 14:49:56 · 244 阅读 · 0 评论 -
HDU-2717 BFS
Problem Description: Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a p...原创 2019-02-08 09:05:53 · 175 阅读 · 0 评论 -
HDU-1426 DFS PE
Problem Description: 填数独 Presentation Error = = Input 本题包含多组测试,每组之间由一个空行隔开。每组测试会给你一个 9*9 的矩阵,同一行相邻的两个元素用一个空格分开。其中1-9代表该位置的已经填好的数,问号(?)表示需要你填的数。 Output 对于每组测试,请输出它的解,同一行相邻的两个数用一个空格分开。两组解之间要一个空行。 对于每组测试...原创 2019-02-03 23:19:49 · 159 阅读 · 0 评论