上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 50 下一页
摘要: A sequence S = {s1, s2, ..., sn} is called heapable if there exists a binary tree T with n nodes such that every node is labelled with exactly one ele 阅读全文
posted @ 2017-04-25 21:47 gongpixin 阅读(862) 评论(0) 推荐(0) 编辑
摘要: 二分查找 二分查找变形 随着二分查找的进行,如果找到key并不结束循环的话,最终的结束状态会是right < left,并且right + 1 = left。 当数组中存在key时,根据二分区间选择的不同,这里又分为两种情况,如下图(key为2时), 当数组中不存在key时,最后仅有一种情况,即把图 阅读全文
posted @ 2017-04-25 12:28 gongpixin 阅读(13238) 评论(14) 推荐(7) 编辑
摘要: http://blog.csdn.net/gg_gogoing/article/details/40312827 单调队列单调栈应用范围: 求一串数最长不降子序列,维护一个单调不减栈。 1. 自此元素最远的不大于(不小于)本身的数 单调栈与单调队列很相似,首先栈是后进先出的,单调性指的是严格的递增或 阅读全文
posted @ 2017-04-24 17:12 gongpixin 阅读(301) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/whywhy/p/5066306.html 队列和栈是很常见的应用,大部分算法中都能见到他们的影子。 而单纯的队列和栈经常不能满足需求,所以需要一些很神奇的队列和栈的扩展。 其中最出名的应该是优先队列吧我觉得,然后还有两种比较小众的扩展就是单调队列和单调 阅读全文
posted @ 2017-04-24 16:49 gongpixin 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 1012: [JSOI2008]最大数maxnumber Description 现在请求你维护一个数列,要求提供以下两种操作:1、 查询操作。语法:Q L 功能:查询当前数列中末尾L个数中的最大的数,并输出这个数的值。限制:L不超过当前数列的长度。2、 插入操作。语法:A n 功能:将n加上t,其 阅读全文
posted @ 2017-04-24 16:22 gongpixin 阅读(232) 评论(0) 推荐(0) 编辑
摘要: http://www.voidcn.com/blog/zhuangxiaobin/article/p-536751.html 阅读全文
posted @ 2017-04-23 20:33 gongpixin 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 下面这段代码在输入时会加速? 阅读全文
posted @ 2017-04-23 18:36 gongpixin 阅读(414) 评论(0) 推荐(0) 编辑
摘要: A seven segment display, or seven segment indicator, is a form of electronic display device for displaying decimal numerals that is an alternative to 阅读全文
posted @ 2017-04-23 18:00 gongpixin 阅读(1151) 评论(0) 推荐(0) 编辑
摘要: Japari Park is a large zoo home to extant species, endangered species, extinct species, cryptids and some legendary creatures. Due to a mysterious sub 阅读全文
posted @ 2017-04-23 16:49 gongpixin 阅读(353) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/duoduo369/archive/2012/04/12/2439118.html 迭代器(iterator) 个人理解就是把所有和迭代有关的东西给抽象出来的,不管是数组的下标,指针,for里面的、list里面的、vector里面的,抽象一下变成了ite 阅读全文
posted @ 2017-04-23 15:14 gongpixin 阅读(309) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 50 下一页