![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
文章平均质量分 73
zzuspy
本人初学者~~
展开
-
UVA - 657 - The die is cast (两次DFS!!)
UVA - 657The die is castTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescription The die is cast原创 2014-12-16 23:01:36 · 720 阅读 · 0 评论 -
POJ - 1011 - Sticks (DFS + 剪枝)
题目传送:Sticks思路:DFS + 剪枝AC代码:#include #include #include #include #include #include #include #include #include #include #include #include #define LL long long#define INF 0x7fff原创 2015-05-06 00:40:35 · 774 阅读 · 1 评论 -
POJ - 3278 - Catch That Cow (BFS)
题目传送:Catch That Cow思路:BFS找最小步数,用一个结构体存下当前结点的数值以及当前步数AC代码:#include #include #include #include #include #include #include #include #include #include #include #include #include原创 2015-05-22 19:55:06 · 901 阅读 · 0 评论 -
HDU - 1973 - Prime Path (BFS)
题目传送:Prime Path思路:上次选拔赛的题,简单BFS,当时没有做出来,突然发现自己当时是多么的弱。。一个简单搜索都不会。。这里只要先筛出1000到10000的素数,然后再用队列模拟一下其过程即可,用结构体存下当前素数以及当前所在的层次,即本题所求的最小步数,当时好像就是这里没想通怎么实现最小步数跪的AC代码:#include #include #inclu原创 2015-05-22 21:38:11 · 632 阅读 · 0 评论 -
POJ - 1426 - Find The Multiple (DFS)
题目传送:Find The Multiple思路:DFSAC代码:#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define LL lo原创 2015-05-25 00:09:06 · 865 阅读 · 0 评论 -
POJ - 2251 - Dungeon Master (简单BFS)
Dungeon MasterTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20450 Accepted: 7917DescriptionYou are trapped in a 3D dungeon and need to find the quic原创 2015-07-25 10:20:08 · 660 阅读 · 0 评论 -
广搜简单题
Catch That Cow题目传送:POJ - 3278 - Catch That Cow题解:点击即传送迷宫问题题目传送:POJ - 3984 - 迷宫问题DFS也可以,见另一个题解AC代码(BFS):#include <map>#include <set>#include <cmath>#include <deque>#include <queue>#include <stack>原创 2015-07-31 12:37:05 · 609 阅读 · 0 评论 -
深搜简单题
城堡问题题目传送:2815:城堡问题AC代码(递归形式的dfs):#include <map>#include <set>#include <cmath>#include <deque>#include <queue>#include <stack>#include <cstdio>#include <cctype>#include <string>#include <vector原创 2015-08-29 08:55:56 · 2348 阅读 · 0 评论 -
POJ - 2286 - The Rotation Game (IDA*)
IDA*算法,即迭代加深的A*算法,实际上就是迭代加深+DFS+估价函数题目传送:The Rotation GameAC代码:#include <map>#include <set>#include <list>#include <cmath>#include <deque>#include <queue>#include <stack>#include <bitset>#inclu原创 2015-08-14 23:15:55 · 641 阅读 · 0 评论 -
HDU - 1429 - 胜利大逃亡(续)
胜利大逃亡(续)题目传送:HDU - 1429 - 胜利大逃亡(续)基础广搜题,注意是用位运算来判断的是否有钥匙的。少写一个字母找了好久的bug。。好久的bug。。的bug。。bug。。gAC代码:#include <map>#include <set>#include <cmath>#include <deque>#include <queue>#include <stack>#inc原创 2015-08-03 22:30:13 · 1064 阅读 · 0 评论 -
POJ - 3984 - 迷宫问题 (DFS)
迷宫问题Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10936 Accepted: 6531Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0,原创 2015-07-24 12:57:17 · 1266 阅读 · 0 评论 -
HDU - 5202 - Rikka with string (DFS)
Rikka with stringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 214 Accepted Submission(s): 109Problem DescriptionAs we know原创 2015-04-11 23:45:19 · 1108 阅读 · 0 评论 -
UVA - 10004 - Bicoloring (简单图论-着色判断)
UVA - 10004BicoloringTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescription Bicoloring In 1976原创 2015-04-18 20:16:48 · 867 阅读 · 0 评论 -
蓝桥杯 - 带分数 (DFS)
历届试题 带分数 时间限制:1.0s 内存限制:256.0MB 问题描述100 可以表示为带分数的形式:100 = 3 + 69258 / 714。还可以表示为:100 = 82 + 3546 / 197。注意特征:带分数中,数字1~9分别出现且只出现一次(不包含0)。类似这样的带分数,100 有 11 种表示法。原创 2015-03-18 21:55:43 · 891 阅读 · 0 评论 -
ZZUOJ - 1199 - 大小关系 (拓扑排序!)
1199: 大小关系Time Limit: 2 Sec Memory Limit: 128 MBSubmit: 126 Solved: 27[Submit][Status][Web Board]Description当我们知道一组大小关系之后,可判断所有关系是否都能成立,即关系间没有矛盾。 例如:A 若 A 现在我们知道m个关系,请原创 2014-12-16 16:36:28 · 1376 阅读 · 0 评论 -
UVA - 10305 - Ordering Tasks (拓扑排序!)
UVA - 10305Ordering TasksTime Limit: 3000MSMemory Limit: Unknown64bit IO Format: %lld & %lluSubmit StatusDescriptionProblem FOrdering TasksInput: standard inp原创 2014-12-16 21:42:47 · 796 阅读 · 0 评论 -
UVA - 572 - Oil Deposits (图的DFS!)
UVA - 572Oil DepositsTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescription Oil Deposits T原创 2014-12-16 20:45:26 · 831 阅读 · 0 评论 -
UVA - 11624 - Fire! (BFS的应用)
A - Fire!Time Limit:1000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmitStatusDescriptionProblem B: Fire!Joe works in a maze. Unfortunately, portions of the maze have原创 2015-02-02 23:31:56 · 729 阅读 · 0 评论 -
UVA - 10054 - The Necklace (欧拉回路!!)
UVA - 10054The NecklaceTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescription Problem D: The Necklace原创 2015-02-03 00:06:35 · 1108 阅读 · 1 评论 -
Codeforces Round #292 (Div. 2) -- D. Drazil and Tiles (拓扑排序)
D. Drazil and Tilestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDrazil created a following problem abou原创 2015-02-18 13:26:18 · 1373 阅读 · 0 评论 -
UVA - 10596 - Morning Walk (欧拉回路!并查集判断回路)
UVA - 10596Morning WalkTime Limit: 3000MSMemory Limit: Unknown64bit IO Format: %lld & %lluSubmit StatusDescription Problem HMorning Walk原创 2014-12-17 20:45:27 · 848 阅读 · 0 评论 -
UVA - 439 - Knight Moves (BFS)
UVA - 439Knight MovesTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionA friend of you is doing research on t原创 2015-03-27 23:41:08 · 898 阅读 · 0 评论 -
蓝桥杯 - 剪格子 (简单DFS)
历届试题 剪格子 时间限制:1.0s 内存限制:256.0MB 问题描述如下图所示,3 x 3 的格子中填写了一些整数。+--*--+--+|10* 1|52|+--****--+|20|30* 1|*******--+| 1| 2| 3|+--+--+--+我们沿着图中的星号线剪开,得到两个部分,原创 2015-03-10 23:18:26 · 828 阅读 · 0 评论 -
UVA - 301 - Transportation (暴力回溯)
UVA - 301TransportationTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %lluSubmit StatusDescriptionRuratania is just entering capitalis原创 2015-03-23 14:40:19 · 747 阅读 · 0 评论 -
HDU - 2612 - Find a way (BFS)
Find a wayTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6157 Accepted Submission(s): 2052Problem DescriptionPass a year lea原创 2015-07-24 13:01:37 · 731 阅读 · 0 评论