搜索
swust_fangfangfang
这个作者很懒,什么都没留下…
展开
-
POJ 1103 Maze UVA 705 ShellSort 迷宫建图
题意:给一个由\/字符组成的迷宫,问由这个迷宫形成的图有多少个闭合回路,并且输出最长一条有多长理解:首先就从它给的样例那个图中,就可以看出来每条斜线代表了2个格子,然后闭合回路中最大长度就是闭合回路中格子的格子的个数。那么,输入这个图之后对每个坐标乘2进行放大建图就行了。然后就是暴力跑dfs,跑一个图,暴力标记计数就行,然后需要判断下终点是否和起点相邻,然后判断原创 2016-04-12 10:29:12 · 918 阅读 · 0 评论 -
UVA_10557&POJ_1932 XYZZY 正环负环搜索
XYZZYTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 3633 Accepted: 1046DescriptionThe prototypical computer adventure game, first designed by Will Crow原创 2016-04-13 17:18:44 · 321 阅读 · 0 评论 -
UVa 10047 - The Monocycle 优先队列+BFS
A monocycle is a cycle that runs on one wheel and the one we will be considering is a bit more special. It has a solid wheel colored with five different colors as shown in the figure:The c原创 2016-04-15 17:59:23 · 417 阅读 · 0 评论 -
codeforces 354D. Theseus and labyrinth bfs
D. Theseus and labyrinthtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTheseus has just arrived to Crete to fight M原创 2016-06-07 15:45:42 · 528 阅读 · 0 评论 -
codeforce 677D. Vanya and Treasure bfs
D. Vanya and Treasuretime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVanya is in the palace that can be represente原创 2016-06-11 21:51:20 · 604 阅读 · 0 评论 -
FZU 2124 吃豆人 BFS
吃豆人是一款非常经典的游戏,游戏中玩家控制吃豆人在地图上吃光所有豆子,并且避免被怪物抓住。这道题没有怪物,将游戏的画面分成n*m的格子,每格地形可能为空地或者障碍物,吃豆人可以在空地上移动,吃豆人每移动一格需要1s时间,并且只能朝上下左右四个方向移动,特别的是吃豆人还能吐出舌头,舌头每移动一格需要0.1s时间,舌头只可以走直线。不必考虑吃豆人转身所需要的时间。举例,吃豆人在(1,1)坐标,原创 2016-07-10 14:16:05 · 770 阅读 · 0 评论 -
HDU 4277 USACO ORZ DFS
USACO ORZTime Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4445 Accepted Submission(s): 1469Problem DescriptionLike everyon原创 2016-07-10 21:08:43 · 475 阅读 · 0 评论 -
POJ 3600 Subimage Recognition 搜索
Subimage RecognitionTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 3072 Accepted: 1176DescriptionAn image A is said to be a subimage of another imag原创 2016-10-07 20:30:20 · 420 阅读 · 0 评论