ACM__BFS
文章平均质量分 83
wust_zwl
学不死,就往死里学。
展开
-
POJ 3626 Mud Puddles(BFS)【模板】
Farmer John is leaving his house promptly at 6 AM for his daily milking of Bessie. However, the previous evening saw a heavy rain, and the fields are quite muddy. FJ starts at the point (0, 0) in the coordinate plane and heads toward Bessie who is located原创 2017-08-01 16:31:13 · 232 阅读 · 0 评论 -
Codeforces 134C Swaps (bfs+优先队列)【模板】
There are n players sitting at a round table. All of them have s cards of n colors in total. Besides, initially the first person had cards of only the first color, the second one had cards of only the second color and so on. They can swap the cards by the原创 2017-08-08 20:15:02 · 499 阅读 · 0 评论 -
ZOJ 3446 Doraemon's Battle (三维dp+BFS)【打怪类模板】
Doraemon is fighting with n enemies.Doraemon has two properties in this battle, HP and SP. HP is the health point of Doraemon with initial value lh. If Doraemon's HP decreased to 0 or lower, Doraemon will lose the battle. SP is a property for using Dorae原创 2017-08-18 11:05:48 · 316 阅读 · 0 评论 -
POJ 1383 Labyrinth (技巧BFS)
The northern part of the Pyramid contains a very large and complicated labyrinth. The labyrinth is divided into square blocks, each of them either filled by rock, or free. There is also a little hook on the floor in the center of every free block. The ACM原创 2017-08-15 19:46:48 · 325 阅读 · 0 评论 -
2017 icpc 南宁赛区 J. Minimum Distance in a Star Graph(bfs)
In this problem, we will define a graph called star graph, and the question is to find the minimum distance between two given nodes in the star graph.Given an integer nn, an n-dimensionaln−dimensional star graph, also referred to as S_{n}Sn , is an原创 2017-09-26 19:14:16 · 261 阅读 · 0 评论