摘要: DNA SortingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 83069 Accepted: 33428DescriptionOne measure of ``unsortednes... 阅读全文
posted @ 2015-03-31 20:19 peerslee2 阅读(129) 评论(0) 推荐(0) 编辑
摘要: #include #include #include int main(){ std::string s; // assign(size_type count, CharT ch) s.assign(4, '='); std::cout ilist) s.assign({ 'C', '... 阅读全文
posted @ 2015-03-30 18:45 peerslee2 阅读(170) 评论(0) 推荐(0) 编辑
摘要: string类的构造函数:string(const char *s); //用c字符串s初始化string(int n,char c); //用n个字符c初始化此外,string类还支持默认构造函数和复制构造函数,如string s1;string s2="hello";都是正确的写法... 阅读全文
posted @ 2015-03-29 22:03 peerslee2 阅读(183) 评论(0) 推荐(0) 编辑
摘要: DFS+剪枝 POJ2362的强化版,重点在于剪枝 令InitLen为所求的最短原始棒长,maxlen为给定的棒子堆中最长的棒子,sumlen为这堆棒子的长度之和,那么InitLen必定在范围[maxlen,sumlen]中 根据棒子的灵活度(棒子越长,灵活度越低) DFS前先对所有棒子降序排序 剪... 阅读全文
posted @ 2015-03-29 14:33 peerslee2 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 问题描述 人自出生起就有体力,情感和智力三个生理周期,分别为23,28和33天。一个周期内有一天为峰值,在这一天,人在对应的方面(体力,情感或智力)表现最好。通常这三个周期的峰值不会是同一天。现在给出三个日期,分别对应于体力,情感,智力出现峰值的日期。然后再给出一个起始日期,要求从这一天开始,算出最... 阅读全文
posted @ 2015-03-25 22:11 peerslee2 阅读(173) 评论(1) 推荐(0) 编辑
摘要: 1) n = 0; return 1;2) n = 1; bool standardizeNumNoDot(string &s){标准化是一定要得} _将‘.’前后的〇全部去除,正常return就ok!3) s : 整数(前后有〇+有小数点) 小数(前后有〇+只有小数点 eg:0.11 ) 处理:1... 阅读全文
posted @ 2015-03-22 16:51 peerslee2 阅读(101) 评论(0) 推荐(0) 编辑
摘要: document.createElement()是在对象中创建一个对象,要与appendChild() 或 insertBefore()方法联合使用。其中,appendChild() 方法在节点的子节点列表末添加新的子节点。insertBefore() 方法在节点的子节点列表任意位置插入新的节点。下... 阅读全文
posted @ 2015-03-15 16:25 peerslee2 阅读(142) 评论(0) 推荐(0) 编辑
摘要: http://walsh.iteye.com/blog/261941 阅读全文
posted @ 2015-03-09 22:29 peerslee2 阅读(94) 评论(0) 推荐(0) 编辑
摘要: http://www.csdn.net/article/2015-03-06/2824127-css4 阅读全文
posted @ 2015-03-07 13:43 peerslee2 阅读(94) 评论(0) 推荐(0) 编辑
摘要: css中有四种不同的选择器①类选择器,又叫class选择器.类选择器{属性名:属性值;...}/*类选择器*/.s1{font-weight:bold;font-size:16px;}②id选择器#id选择器名{属性名:属性值;}/*id选择器*/#id1{font-size:40px;}③html... 阅读全文
posted @ 2015-03-06 18:08 peerslee2 阅读(598) 评论(0) 推荐(0) 编辑