DFS/BFS
文章平均质量分 77
锅巴QAQ
三十年河东,三十年河西!
展开
-
L - Oil Deposits HDU - 1241
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 divides th原创 2017-03-31 17:03:37 · 473 阅读 · 0 评论 -
K - 迷宫问题 POJ - 3984
定义一个二维数组: int maze[5][5] = {0, 1, 0, 0, 0,0, 1, 0, 1, 0,0, 0, 0, 0, 0,0, 1, 1, 1, 0,0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上原创 2017-03-31 17:01:18 · 564 阅读 · 0 评论 -
E - Find The Multiple POJ - 1426
Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 200 and there原创 2017-03-31 16:58:34 · 392 阅读 · 0 评论 -
C - Catch That Cow POJ - 3278
Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100原创 2017-03-31 16:56:00 · 442 阅读 · 0 评论 -
B - Dungeon Master POJ - 2251
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south原创 2017-03-31 16:37:08 · 503 阅读 · 0 评论 -
A - 棋盘问题 POJ - 1321
两个棋子不能放在棋盘中的同一行或者同一列两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n 当为-1 -1时表示输入结束。 随后的n行描述了棋盘的形状:每行有n个字符,其中 # 表示棋盘区域, . 表示空白区域Sample Input2 1#..#4 2...#..#..#..#...-1原创 2017-03-31 16:35:36 · 4383 阅读 · 1 评论 -
Catch That Cow(抓住那头牛)
Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,0原创 2017-03-28 21:50:39 · 583 阅读 · 0 评论 -
Mid-Central USA 1997--Oil Deposits (油田问题)
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 divides th原创 2017-03-28 21:32:04 · 1635 阅读 · 0 评论