搜索
文章平均质量分 76
方小伟
这个作者很懒,什么都没留下…
展开
-
A Knight's Journey 解题报告
题目大意: 骑士在一个棋盘上走,是否能全部遍历整个棋盘,他是按"日"方式走的. 重点是按字典顺序输出的 解题思路: dfs+回溯,横行为字母,纵行为数字。 #include #include #define原创 2013-10-30 21:03:58 · 2939 阅读 · 0 评论 -
Children of the Candy Corn DFS+BFS
Language: Default Children of the Candy Corn Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8492 Accepted: 3722 Description The cornfield maze is a po原创 2013-11-19 17:27:53 · 718 阅读 · 0 评论 -
棋盘问题 DFS
Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n原创 2013-11-29 22:18:49 · 517 阅读 · 0 评论 -
Tempter of the Bone DFS+奇偶剪枝
Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He原创 2014-02-28 21:12:40 · 527 阅读 · 0 评论 -
Curling 2.0 DFS+回溯+减枝
Description On Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a squa原创 2013-11-27 23:38:51 · 502 阅读 · 0 评论 -
Dungeon Master BFS
Description 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 un原创 2014-03-10 20:32:36 · 465 阅读 · 0 评论 -
Catch That Cow BFS
Description 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原创 2014-03-11 11:05:09 · 474 阅读 · 0 评论 -
Lake Counting DFS水题
Description Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square contains原创 2014-03-07 22:19:48 · 516 阅读 · 0 评论 -
Oil Deposits DFS水题
Description 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原创 2014-03-07 22:37:05 · 533 阅读 · 0 评论