搜索算法
文章平均质量分 80
wust_cyl
在非洲,瞪羚每天早上醒来时,他知道自己必须跑的比最快的狮子还快,否则就会被吃掉.狮子每天早上醒来时,他知道自己必须追上跑得最慢的瞪羚,否则就会被饿死.不管你是狮子还是瞪羚,当太阳升起时,你最好开始奔跑
展开
-
CodeForces 194C(dfs)
问题描述:You've gotten an n × m sheet of squared paper. Some of its squares are painted. Let's mark the set of all painted squares as A. Set A is connected. Your task is to find the minimum number of squa...原创 2018-01-04 16:42:55 · 264 阅读 · 0 评论 -
URAL - 1056(DFS)
问题描述:BackgroundComputer net is created by consecutive computer plug-up to one that has already been connected to the net. Each new computer gets an ordinal number, but the protocol contains the number...原创 2017-12-05 14:14:15 · 244 阅读 · 0 评论 -
CodeForces 825B(DFS)
问题描述:Alice and Bob play 5-in-a-row game. They have a playing field of size 10 × 10. In turns they put either crosses or noughts, one at a time. Alice puts crosses and Bob puts noughts.In current match...原创 2017-11-09 16:21:33 · 297 阅读 · 0 评论 -
CodeForces 327D(DFS)
问题描述:After too much playing on paper, Iahub has switched to computer games. The game he plays is called "Block Towers". It is played in a rectangular grid with n rows and mcolumns (it contains n × m c...原创 2017-10-31 19:32:13 · 322 阅读 · 0 评论 -
HDU 1241(DFS)
问题描述:The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divid...原创 2017-09-25 11:05:21 · 223 阅读 · 0 评论 -
hdu 5546(DFS或BFS)
问题描述:Yu Zhou likes to play Go with Su Lu. From the historical research, we found that there are much difference on the rules between ancient go and modern go. Here is the rules for ancient go they wer...原创 2017-09-19 22:57:54 · 1096 阅读 · 0 评论 -
Codeforces Round #149 (Div. 2) (bfs+STL)
问题描述:The black king is standing on a chess field consisting of 109 rows and 109 columns. We will consider the rows of the field numbered with integers from 1 to 109 from top to bottom. The columns are...原创 2017-10-16 23:01:26 · 228 阅读 · 0 评论 -
HDU 1062(优先队列+BFS)
问题描述:The Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166's castle. The castle is a large labyrinth. To make the pro...原创 2017-09-28 20:48:08 · 290 阅读 · 0 评论 -
HDU 1728(BFS)
问题描述:给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程中,不能转太多弯了,否则她会晕倒的。我们...原创 2017-09-25 18:22:08 · 342 阅读 · 0 评论