小小程序媛  
得之坦然,失之淡然,顺其自然,争其必然
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 34 下一页

2015年9月17日

摘要: 题目题目大意叙述如下:现有 A、B 两队进行篮球比赛,位置 d 为三分线,在三分线外进球则得 3 分,三分线内进球则得 2 分;设 A 队整场进球 n 个,位置分别为 a1,a2,...an 设 B 队整场进球 m 个,位置分别为 b1,b2,...bm 主人公小明有权设立三分线... 阅读全文
posted @ 2015-09-17 08:57 Coding菌 阅读(125) 评论(0) 推荐(0) 编辑
 
摘要: 题目详细叙述已经记不下来了,题目大意如下:一条A点到B点的道路长 l ,现在为该条道路设置 n 个路灯,每个路灯照射的长度固定为 d ,假设这 n 个路灯分别设置在 a1,a2...ai...an ,(路灯可以设置在首尾A点B点处,也可以在同一点设置多个),求使得整条道路保持光明的... 阅读全文
posted @ 2015-09-17 08:39 Coding菌 阅读(161) 评论(0) 推荐(0) 编辑

2015年9月16日

摘要: 题目Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row ar... 阅读全文
posted @ 2015-09-16 21:23 Coding菌 阅读(193) 评论(0) 推荐(0) 编辑
 
摘要: 题目Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up: Did you use... 阅读全文
posted @ 2015-09-16 19:27 Coding菌 阅读(192) 评论(0) 推荐(0) 编辑
 
摘要: 题目如下图: 分析碰撞检测问题:程序实现 阅读全文
posted @ 2015-09-16 09:36 Coding菌 阅读(154) 评论(0) 推荐(0) 编辑
 
摘要: 题目如下图: 分析程序实现 阅读全文
posted @ 2015-09-16 09:32 Coding菌 阅读(128) 评论(0) 推荐(0) 编辑
 
摘要: 题目如下图: 分析哈夫曼编码问题!程序实现#include #include #include using namespace std;const int MAXLEN = 100;typedef struct Huffmantree{ char ch; /*键值*/ ... 阅读全文
posted @ 2015-09-16 09:31 Coding菌 阅读(148) 评论(0) 推荐(0) 编辑
 
摘要: 题目如下图: 分析利用栈的思想: 具体思路见程序实现,详细注释!程序实现#include #include #include #include using namespace std;int getLen(string str){ if (str.empty()) ... 阅读全文
posted @ 2015-09-16 09:19 Coding菌 阅读(180) 评论(0) 推荐(0) 编辑

2015年9月14日

摘要: 题目Validate if a given string is numeric.Some examples: “0” => true ” 0.1 ” => true “abc” => false “1 a” => false “2e10” => true Note: It is i... 阅读全文
posted @ 2015-09-14 19:51 Coding菌 阅读(383) 评论(0) 推荐(0) 编辑
 
摘要: 题目Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals w... 阅读全文
posted @ 2015-09-14 19:24 Coding菌 阅读(130) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 34 下一页