上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 36 下一页

2017年9月6日

POJ1426 Find The Multiple —— BFS

摘要: 题目链接:http://poj.org/problem?id=1426 Find The Multiple Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 34218 Accepted: 14337 Special Judge D 阅读全文

posted @ 2017-09-06 11:04 h_z_cong 阅读(160) 评论(0) 推荐(0) 编辑

POJ3279 Fliptile —— 状态压缩 + 模拟

摘要: 题目链接:http://poj.org/problem?id=3279 Fliptile Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 11771 Accepted: 4360 Description Farmer John k 阅读全文

posted @ 2017-09-06 11:01 h_z_cong 阅读(189) 评论(0) 推荐(0) 编辑

2017年9月5日

POJ1077 Eight —— IDA*算法

摘要: 主页面:http://www.cnblogs.com/DOLFAMINGO/p/7538588.html 代码一:像BFS那样,把棋盘数组放在结构体中。 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include 阅读全文

posted @ 2017-09-05 20:03 h_z_cong 阅读(275) 评论(0) 推荐(0) 编辑

POJ1077 Eight —— A*算法

摘要: 主页面:http://www.cnblogs.com/DOLFAMINGO/p/7538588.html 关于A*算法:g(n)表示从起点到任意节点n的路径花费,h(n)表示从节点n到目标节点路径花费的估计值(启发值),f(n) = g(n)+h(n)。 A*算法必须满足的条件(能不能满足由所选的h 阅读全文

posted @ 2017-09-05 20:02 h_z_cong 阅读(305) 评论(0) 推荐(2) 编辑

POJ1077 Eight —— 双向BFS

摘要: 主页面:http://www.cnblogs.com/DOLFAMINGO/p/7538588.html (代码一直在精简完善……) 代码一:两个BFS, 两段代码; 用step控制“你一步, 我一步”。 1 #include <iostream> 2 #include <cstdio> 3 #in 阅读全文

posted @ 2017-09-05 20:00 h_z_cong 阅读(270) 评论(0) 推荐(0) 编辑

POJ1077 Eight —— 反向BFS

摘要: 主页面:http://www.cnblogs.com/DOLFAMINGO/p/7538588.html 代码一:以数组充当队列,利用结构体中的pre追溯上一个状态在数组(队列)中的下标: 1 #include <iostream> 2 #include <cstdio> 3 #include <c 阅读全文

posted @ 2017-09-05 19:55 h_z_cong 阅读(252) 评论(0) 推荐(0) 编辑

POJ1077 Eight —— 正向BFS

摘要: 主页面:http://www.cnblogs.com/DOLFAMINGO/p/7538588.html 代码一:以数组充当队列,利用结构体中的pre追溯上一个状态在数组(队列)中的下标: 1 #include <iostream> 2 #include <cstdio> 3 #include <c 阅读全文

posted @ 2017-09-05 19:46 h_z_cong 阅读(286) 评论(0) 推荐(0) 编辑

2017年9月3日

POJ1077 Eight —— 经典的搜索问题

摘要: 题目链接:http://poj.org/problem?id=1077 Eight Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 33267 Accepted: 14404 Special Judge Description T 阅读全文

posted @ 2017-09-03 21:14 h_z_cong 阅读(354) 评论(0) 推荐(0) 编辑

HDU2181 哈密顿绕行世界问题 —— DFS

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2181 哈密顿绕行世界问题 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total S 阅读全文

posted @ 2017-09-03 21:09 h_z_cong 阅读(139) 评论(0) 推荐(0) 编辑

UVA11624 Fire! —— BFS

摘要: 题目链接:https://vjudge.net/problem/UVA-11624 题解: 坑点:“portions of the maze havecaught on fire”, 表明了起火点不唯一。 火和人使用同一种结构体,用id来区别类型。BFS求解:首先将所有火苗入队,然后人再入队(肯定要 阅读全文

posted @ 2017-09-03 21:05 h_z_cong 阅读(185) 评论(0) 推荐(0) 编辑

2017年9月2日

HDU2102 A计划 —— BFS

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2102 A计划 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submiss 阅读全文

posted @ 2017-09-02 22:26 h_z_cong 阅读(153) 评论(0) 推荐(0) 编辑

POJ3414 Pots —— BFS + 模拟

摘要: 题目链接:http://poj.org/problem?id=3414 Pots Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18550 Accepted: 7843 Special Judge Description You 阅读全文

posted @ 2017-09-02 22:15 h_z_cong 阅读(174) 评论(0) 推荐(0) 编辑

HDU1495 非常可乐 —— BFS + 模拟

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1495 非常可乐 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submis 阅读全文

posted @ 2017-09-02 22:00 h_z_cong 阅读(260) 评论(0) 推荐(0) 编辑

2017年9月1日

POJ3126 Prime Path —— BFS + 素数表

摘要: 题目链接:http://poj.org/problem?id=3126 Prime Path Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22936 Accepted: 12706 Description The minist 阅读全文

posted @ 2017-09-01 20:41 h_z_cong 阅读(237) 评论(0) 推荐(0) 编辑

HDU1241 Oil Deposits —— DFS求连通块

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1241 Oil Deposits Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Tota 阅读全文

posted @ 2017-09-01 20:09 h_z_cong 阅读(174) 评论(0) 推荐(0) 编辑

上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 36 下一页

导航