题目链接:[ POJ - 2376 ]
Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around th...
阅读全文...
DFS 图的联通块 UVA-572 Oil Deposits
题目链接:[ UVA - 572 ]
The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits....
阅读全文...
阅读全文...
DFS POJ-2386 Lake Counting
[POJ - 2386]
Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectan...
阅读全文...
阅读全文...
DFS 图的联通块 POJ-1979 Red and Black
[ POJ - 1979]
Here is a rectangular room, covered with square tiles. Each tile is colored either red or black. A ...
阅读全文...
阅读全文...
DFS 图的联通块 AOJ-0118 Property Distribution
[ Aizu - 0118 ]
这道题类似于联通图问题,将联通的归成一个,数一下总共有几个即可。
因为题目告诉不会有空格,所以排除标记用空格表示即可。
Sample Input
10 10
####*****@
@#@@@@#*#*
@##***@@...
阅读全文...
阅读全文...
BFS 图的最短路径 Aizu-0558 Cheese
[ Aizu - 0558 ]
大意:在H * W的地图上有N个奶酪工厂,每个工厂分别生产硬度为1-N的奶酪。有一只老鼠准备从出发点吃遍每一个工厂的奶酪。老鼠有一个体力值,初始时为1,每吃一个工厂的奶酪体力值增加1(每个工厂只能吃一次),且老鼠只能吃...
阅读全文...
阅读全文...