
图论之搜索问题模板
文章平均质量分 70
让你一生残梦
这个作者很懒,什么都没留下…
展开
-
福州大学第十届程序设计竞赛_吃豆人(BFS+地图处理)
Title:吃豆人是一款非常经典的游戏,游戏中玩家控制吃豆人在地图上吃光所有豆子,并且避免被怪物抓住。这道题没有怪物,将游戏的画面分成n*m的格子,每格地形可能为空地或者障碍物,吃豆人可以在空地上移动,吃豆人每移动一格需要1s时间,并且只能朝上下左右四个方向移动,特别的是吃豆人还能吐出舌头,舌头每移动一格需要0.1s时间,舌头只可以走直线。不必考虑吃豆人转身所需要的时间。举例,吃豆人在...原创 2018-08-14 12:20:24 · 1173 阅读 · 0 评论 -
搜索问题(不带权值的BFS)_小明系列故事——捉迷藏
Title:小明的妈妈生了三个孩子,老大叫大明, 老二叫二明, 老三..., 老三自然就叫小明了。 一天,小明的妈妈带小明兄弟三人去公园玩耍,公园里面树木很多,有很多地方可以藏身, 于是他们决定玩捉迷藏。经过几轮的猜拳后,第一轮是小明来找其他两个人,游戏规则很简单: 只要小明可以在规定的时间内找到他们就算小明获胜,并且被发现的两个人猜拳决定谁在下一轮负责找人;如果在规定的时间内只找到...原创 2018-08-04 20:14:29 · 459 阅读 · 0 评论 -
Floyd_带路径记录_英文题_Minimum Transport Cost
Title:These are N cities in Spring country. Between each pair of cities there may be one transportation track or none. Now there is some cargo that should be delivered from one city to another. The ...原创 2018-08-02 14:22:32 · 329 阅读 · 0 评论 -
Jumping on Walls
Vasya plays a computer game with ninjas. At this stage Vasya's ninja should get out of a deep canyon.The canyon consists of two vertical parallel walls, their height is n meters. Let's imagine th...原创 2018-02-08 12:17:32 · 563 阅读 · 0 评论 -
Agri-Net Prim(Kruskal)的应用
描述 Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course.Farmer John ordered a h...原创 2017-12-05 18:20:38 · 306 阅读 · 0 评论 -
E - 简单的图论问题?
给一个 n 行 m 列的迷宫,每个格子要么是障碍物要么是空地。每个空地里都有一个权值。你的 任务是从找一条(r1,c1)到(r2,c2)的路径,使得经过的空地的权值之和最小。每一步可以往上下 左右四个方向之一移动一格,但不能斜着移动,也不能移动到迷宫外面或者进入障碍物格子。如下图,灰色格子代表障碍物。路径 A->B->D->F->E 的权值为 10+3+6+14+...转载 2017-08-18 11:25:52 · 769 阅读 · 0 评论 -
Travel(两点之间求路的旅行)
描述There are N cities in this country, and some of them are connected by roads. Given two cities, can you find the shortest distance between them?输入The first line contains the number of test case...原创 2017-08-11 16:19:37 · 387 阅读 · 0 评论 -
zoj _Fire Net(DFS+枚举)
Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.A blockhouse is a small castle th...原创 2018-09-14 08:54:54 · 589 阅读 · 0 评论