码迷,mamicode.com
首页 >  
搜索关键字:binary index tree    ( 56466个结果
Uva 10765 点双连通求删任意点后剩下图中的连通分量数
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=1706&mosmsg=Submission+received+with+ID+13561937 题意:给定n个点 常量m 下面给出无向边(输入-1 -1表示终止加边) 得到...
分类:其他好文   时间:2014-07-22 23:04:54    阅读次数:392
【LeetCode】- Search Insert Position(查找插入的位置)
[ 问题: ] Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in th...
分类:其他好文   时间:2014-07-22 23:01:15    阅读次数:270
哈夫曼树 POJ 3253 Fence Repair
竟然做过原题,一眼看上去竟然没感觉。。。 哈夫曼树定义:给定n个权值作为n个叶子结点,构造一棵二叉树,若带权路径长度达到最小,称这样的二叉树为最优二叉树,也称为哈夫曼树(Huffman tree)。哈夫曼树是带权路径长度最短的树,权值较大的结点离根较近。 1、路径和路径长度 在一棵树中,从一个结点往下可以达到的孩子或孙子结点之间的通路,称为路径。通路中分支的数目称为路径长度。若规...
分类:其他好文   时间:2014-07-22 22:59:32    阅读次数:293
sed
sed‘s/^/\//g‘4行首增加指定字符提取网页中的播放地址:#!/bin/bash printf"enteryourdir:" readdir echo"$dirisxx" cd$dir echo`pwd` forfilein`ls.` do if[-d$file];then echo$file cd$file echo`pwd` tree`pwd`|grepplay|sed‘s/.*//g‘>11 tree`pwd`|grepplay|sed‘s/.*//g..
分类:其他好文   时间:2014-05-03 00:53:15    阅读次数:336
uva 12299 线段树 点相关的操作模板
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=502&page=show_problem&problem=3720 唯一值得一说的就是shift,变成循环就行 这道题主要是测试下我做的算法模板 先贴模板 /**********************************...
分类:其他好文   时间:2014-05-02 21:29:31    阅读次数:345
GDB 调试程序
一 设置, 查看, 删除断点信息b xxx.cpp : num(or function)在 xxx.cpp 的第 num 行设置断点, 假如项目中只有一个 .cpp 文件, 不需要指定 xxx.cpp, 直接 b num 即可info break 查看断点信息, 断点信息中有断点的 index, 通...
分类:数据库   时间:2014-05-01 21:09:59    阅读次数:433
win7下android开发环境搭建(win7 64位)
一、安装 JDK 下载JDK最新版本,下载地址如下: http://www.oracle.com/technetwork/java/javase/downloads/index.html 二、下载并安装 Eclipse http://www.eclipse.org/downloads/
分类:移动开发   时间:2014-05-01 21:03:30    阅读次数:560
多线程-5
#include #include //using namespace std; DWORD WINAPI Fun1Proc( LPVOID lpParameter // thread data ); DWORD WINAPI Fun2Proc( LPVOID lpParameter // thread data ); int index=0; int tickets=100;...
分类:编程语言   时间:2014-05-01 18:25:42    阅读次数:323
thinkphp的分页格式自定义
public function index(){         header('Content-Type:text/html;charset=utf-8 '); $M = M("Constant");           $count = $M->where($where)->count();           import("ORG.Util.Page"); // 导入分页类   ...
分类:Web程序   时间:2014-04-30 22:27:39    阅读次数:343
UVA 100 3n+1问题 (扑街题)
链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=36 叼伱个扑街,对呢道题真系无语,,提交5次都过唔到,唔相信既话,伱地可以试下啦。。。 偶噶代码: #include #include #include #include ...
分类:其他好文   时间:2014-04-30 22:16:39    阅读次数:319
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!