码迷,mamicode.com
首页 >  
搜索关键字:binary tree upside d    ( 23249个结果)
NYoj-Binary String Matching-KMP算法
Binary String Matching 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描述Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear as ...
分类:编程语言   时间:2014-10-18 09:50:53    阅读次数:238
hdu 4912 Paths on the tree(树链剖分+贪心)
题目链接:hdu 4912 Paths on the tree 题目大意:给定一棵树,和若干个通道,要求尽量选出多的通道,并且两两通道不想交。 解题思路:用树链剖分求LCA,然后根据通道两端节点的LCA深度排序,从深度最大优先选,判断两个节点均没被标 记即为可选通道。每次选完通道,将该通道LCA以下点全部标记。 #pragma comment(linker, "/STACK:1...
分类:其他好文   时间:2014-10-18 08:38:21    阅读次数:230
算法导论 2.3-5 二分查找
1、二分查找(Binary Search) 二分查找又称折半查找,它是一种效率较高的查找方法。 二分查找要求:线性表是有序表,即表中结点按关键字有序,并且表的存储结构为顺序结构。不妨设有序表是递增有序的。2、二分查找的基本思想二分查找算法思想:(1)首先确定该区间的中点位置: mid = ( l.....
分类:编程语言   时间:2014-10-18 01:53:51    阅读次数:376
【android】优秀的UI资源网站集合
1.http://ionicons.com/ 这个网站的图标能满足大部分人的需求。里面包含了常用的android风格的图标 ios7风格的图标 以及一些社会化分享图标,总共500个左右。github地址https://github.com/driftyco/ionicons/tree/master/png/512,方便根据名字查找。 2.http://www.easyi...
分类:移动开发   时间:2014-10-18 00:47:06    阅读次数:263
NYoj-Binary String Matching-BF算法
Binary String Matching 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描述Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear as ...
分类:编程语言   时间:2014-10-17 23:28:22    阅读次数:391
bzoj 2631: tree 动态树+常数优化
2631: treeTime Limit:30 SecMemory Limit:128 MBSubmit:1716Solved:576[Submit][Status]Description 一棵n个点的树,每个点的初始权值为1。对于这棵树有q个操作,每个操作为以下四种操作之一:+ u v c:将u到...
分类:其他好文   时间:2014-10-17 23:09:58    阅读次数:285
《刘汝佳算法竞赛入门经典》第五章 数论
Skew Binary斜二进制斜二进制的每位为0, 或 1, 最低位可以为2. 第k位的。。。代表 2k+1 -1,给出一个斜二进制数,把他转换成十进制数。正常模拟就好 1 #include 2 #include 3 char A[1000]; 4 5 int main() { 6 wh...
分类:编程语言   时间:2014-10-17 21:48:03    阅读次数:253
javascript 搜索二叉树
Tree.prototype = { constructor: Tree, addItem: function(value) { var Node = { data: value, left: null, right: null }; if (this.root == null) { this.root = Node;...
分类:编程语言   时间:2014-10-17 18:51:23    阅读次数:255
IOS播放音频 AVAudioPlayer(实例)
1.AVFoundationBuild Phases => Link Binary With Libraies => + => AVFoundation.framework => addfirstviewcontroller.hC代码 #import#import@interfaceFirstVie...
分类:移动开发   时间:2014-10-17 18:19:59    阅读次数:276
MySQL 源码scr.rpm安装的一点注意事项
rpm安装包通常为二进制包(Binary)以及源代码包(Source)两种形式。在使用源码方式安装MySQL的时候,官方网站上下载的源码包通常为scr.rpm格式,而不是直接的tar包,对此,需要先使用rpm命令先安装源码后在进行编译安装,本文是对该方式的描述。...
分类:数据库   时间:2014-10-17 16:57:22    阅读次数:177
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!