上一页 1 2 3 4 5 6 ··· 12 下一页
摘要: 算法:深搜 很不错的一道题!!! Fling is a kind of puzzle games available on phone. This game is played on a board with 7 rows and 8 columns. Each puzzle consists ... 阅读全文
posted @ 2016-03-09 16:07 (慎独) 阅读(365) 评论(0) 推荐(0) 编辑
摘要: 算法:dp 某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹. 怎么办呢?多搞... 阅读全文
posted @ 2016-03-07 21:01 (慎独) 阅读(491) 评论(0) 推荐(0) 编辑
摘要: 算法:搜索(打表) 题目描述 有一楼梯共m级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第m级,共有多少走法? 注:规定从一级到一级有0种走法。 输入 输入数据首先包含一个整数n(1 using namespace std; int a[45]={0, 0 ,1 ,2 ,3 ,5... 阅读全文
posted @ 2016-03-07 19:51 (慎独) 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 算法:深搜(需要剪芝) 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 ... 阅读全文
posted @ 2016-03-06 20:00 (慎独) 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 算法:深搜 自从2006年3月10日至11日的首届数独世界锦标赛以后,数独这项游戏越来越受到人们的喜爱和重视。 据说,在2008北京奥运会上,会将数独列为一个单独的项目进行比赛,冠军将有可能获得的一份巨大的奖品———HDU免费七日游外加lcy亲笔签名以及同hdu acm team合影留念的机会。... 阅读全文
posted @ 2016-03-06 19:14 (慎独) 阅读(397) 评论(0) 推荐(0) 编辑
摘要: 算法:搜索 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束... 阅读全文
posted @ 2016-03-06 13:29 (慎独) 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 算法:深搜 描述 找出从自然数1、2、... 、n(0 #include #include #include using namespace std; int a[13],b[13],step; void dfs(int i,int cur,int deep) { for(int j... 阅读全文
posted @ 2016-03-01 12:05 (慎独) 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 算法:并查集 严重急性呼吸系统综合症( SARS), 一种原因不明的非典型性肺炎,从2003年3月中旬开始被认为是全球威胁。为了减少传播给别人的机会, 最好的策略是隔离可能的患者。 在Not-Spreading-Your-Sickness大学( NSYSU), 有许多学生团体。同一组的学生经常彼... 阅读全文
posted @ 2016-02-29 10:52 (慎独) 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 算法:BFS(简单) A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stac... 阅读全文
posted @ 2016-01-10 16:49 (慎独) 阅读(1062) 评论(0) 推荐(0) 编辑
摘要: 算法:广搜 思路:六种情况 s-m; s-n; n-m; n-s; m-s; m-n; 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的... 阅读全文
posted @ 2016-01-04 17:11 (慎独) 阅读(202) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 12 下一页