
BFS
文章平均质量分 86
心向阳光2014
这个作者很懒,什么都没留下…
展开
-
POJ3414--- Pots
PotsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11891 Accepted: 5028 Special JudgeDescriptionYou are given two pots, having the volume of A and原创 2015-08-10 12:31:31 · 340 阅读 · 0 评论 -
Catch That Cow
Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 60573 Accepted: 18904DescriptionFarmer John has been informed of the location of a fugitiv原创 2015-07-29 20:19:50 · 276 阅读 · 0 评论 -
POJ2251----Dungeon Master
Dungeon MasterTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20912 Accepted: 8106bfs 模板提;DescriptionYou are trapped in a 3D dungeon and need原创 2015-08-06 15:23:33 · 359 阅读 · 0 评论 -
Find The Multiple
0ms,飘过;这道题一开始用DFS做的TLE;想想2^200肯定超啊;后来像题中说枚举一个即可,说明有多个,于是缩小,一直网下缩,所成了WA,完了,得换路子,用BFS居然说超内存(MLE);可能是分的情况太多而且存在大量的重复数据, 算,就200个数,打出来;然后过了!;Find The MultipleTime Limit: 1000MS M原创 2015-08-06 19:51:07 · 669 阅读 · 0 评论 -
POJ___3126Prime Path
Prime PathTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14057 Accepted: 7938枚举所有复合要求的素数DescriptionThe ministers of the cabinet were quite up原创 2015-08-07 08:39:11 · 278 阅读 · 0 评论 -
Children of the Candy Corn
Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11011 Accepted: 4743DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance an原创 2015-07-29 20:23:44 · 362 阅读 · 0 评论 -
SDUTOJ_2193_救基友记3
救基友记3Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^思路:每拿到一个钥匙,都可进入一个新的状态,且这些状态是相互组合的,想到二进制,例如:10101(二进制数),代表拥有了a,c,e钥匙;用一个三维数组存储,vis[x][y][k],x,y代表坐标,k代表所处的层(状态);题目描述 话说CZ由于不原创 2016-02-18 09:57:49 · 529 阅读 · 0 评论 -
SDUT_2141_数据结构实验图论一:基于邻接矩阵的广度优先搜索遍历
数据结构实验图论一:基于邻接矩阵的广度优先搜索遍历Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^题目描述给定一个无向连通图,顶点编号从0到n-1,用广度优先搜索(BFS)遍历,输出从某个顶点出发的遍历序列。(同一个结点的同层邻接点,节点编号小的优先遍历)输入输入第一行为整数n(0对于每组数据,第一行原创 2016-02-20 07:37:24 · 361 阅读 · 0 评论