Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For e...
分类:
其他好文 时间:
2014-06-18 22:11:44
阅读次数:
200
L001-02 语音:1、字母歌:The alphabet song 2、语 音: 元音字母:5个:a e i o u.辅音: 除元音5个以外的所有字母。 音素:是发音的最小单位。如: excuse 就是由几个因素组成的,音素的书面表现形式就是音标。音标分为48个,其中元音:20个,辅音:28个.....
分类:
其他好文 时间:
2014-06-18 21:30:18
阅读次数:
187
作为前端(html、javascript、css)的三大马车之一的css,一直以静态语言存在,HTML5火遍大江南北了、javascript由于NODE.JS而成为目前前后端统一开发语言的不二之选。只有css似乎成为前端开发的被忽视的角色了。
分类:
其他好文 时间:
2014-06-18 20:10:49
阅读次数:
130
zookeeper基本是基于API和console进行znode的操作,并没有一个比较方便的操作界面,这里也发现了taobao 伯岩写的一个工具,可以比较方便的查询zookeeper信息。工具的开发语言主要是node.js(最近比较火),其标榜的是无阻塞的api使用。其原理主要是基于google的V...
分类:
其他好文 时间:
2014-06-18 20:03:33
阅读次数:
219
Problem DescriptionTeacher HU and his 40 students were trapped by the brigands. To show their power, the head of the brigands want to select one peopl...
分类:
其他好文 时间:
2014-06-17 00:28:32
阅读次数:
362
继续校赛前的建图任务,当时只写了DFS遍历,今天把BFS也写了一下。
#include
#include
#include
#include
#include
const int maxe = 10001;
using namespace std;
struct node{
int to,w;
node *next;
}*head[maxe];//he...
分类:
其他好文 时间:
2014-06-16 22:25:20
阅读次数:
286
很经典的题目,而且是标准的线段树增加lazy标志的入门题目。
做了好久线段树,果然是practice makes perfect, 这次很畅快,打完一次性AC了。
标志的线段树函数。
主要是:
更新的时候只更新到需要的节点,然后最后的时候一次性把所以节点都更新完毕。
这也是线段树常用的技术。
#include
const int SIZE = 100005;
struct Node...
分类:
其他好文 时间:
2014-06-16 20:38:39
阅读次数:
182
不是BST,那么搜索两节点的LCA就复杂点了,因为节点是无序的。
下面是两种方法,都写进一个类里面了。
当然需要重复搜索的时候,可以使用线段树及多种方法加速搜索。
#include
#include
using namespace std;
class LCANormalTree
{
struct Node
{
int key;
Node *left, *right;...
分类:
其他好文 时间:
2014-06-16 20:20:04
阅读次数:
234
MongoDB + node-mongoskin基本介绍。...
分类:
数据库 时间:
2014-06-16 20:02:40
阅读次数:
704
一颗binarysearchtree,我们要在其中删除node1。而node1对应的key是,比如说,key1.删除的基本想法是什么呢?1.找到key1对应的那个node在哪里。这个用一个迭代就可以完成了。2.删掉这个node(1)如果这个node没有左右子树,那么直接删掉就好了。(2)如果这个node只有左子树或..
分类:
其他好文 时间:
2014-06-16 18:32:13
阅读次数:
270