![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
丿Star
这个作者很懒,什么都没留下…
展开
-
拯救007 (25 分)
7-14 拯救007 (25 分)在老电影“007之生死关头”(Live and Let Die)中有一个情节,007被毒贩抓到一个鳄鱼池中心的小岛上,他用了一种极为大胆的方法逃脱 —— 直接踩着池子里一系列鳄鱼的大脑袋跳上岸去!(据说当年替身演员被最后一条鳄鱼咬住了脚,幸好穿的是特别加厚的靴子才逃过一劫。)设鳄鱼池是长宽为100米的方形,中心坐标为 (0, 0),且东北角坐标为 (50, 5...原创 2018-12-17 19:10:41 · 1043 阅读 · 0 评论 -
2016年第七届蓝桥杯C/C++程序设计本科B组省赛 剪邮票
剪邮票如【图1.jpg】, 有12张连在一起的12生肖的邮票。现在你要从中剪下5张来,要求必须是连着的。(仅仅连接一个角不算相连)比如,【图2.jpg】,【图3.jpg】中,粉红色所示部分就是合格的剪取。 请你计算,一共有多少种不同的剪取方法。思路:一开始想着直接深搜,从某一邮票开始,结果写不出来,而且会有重复的。参照大神思路,可以在不重复的情况下选取五个邮票,怎么选这5...原创 2019-02-15 11:57:42 · 461 阅读 · 1 评论 -
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...原创 2019-02-11 11:48:38 · 239 阅读 · 0 评论 -
Prime Ring Problem
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime. Note: the number of ...原创 2019-02-11 11:53:58 · 202 阅读 · 0 评论 -
迷宫问题(广搜与深搜)
定义一个二维数组: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表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。Input一个5 ×...原创 2019-02-11 14:08:13 · 396 阅读 · 0 评论 -
n皇后问题
在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。Output共有若干行,每行一个正整数,表示对应输入行的皇后的不同放置数量。Sample Input18...原创 2019-02-11 15:44:50 · 212 阅读 · 0 评论 -
Maze(dfs 回溯)
Pavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell is either empty, or is a wall. You can go from one cell to another only if both cells are empty and have a common side....原创 2019-02-11 17:34:44 · 328 阅读 · 2 评论