题目
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node....
分类:
其他好文 时间:
2014-10-25 18:50:01
阅读次数:
137
---恢复内容开始---1.download qemu-master from xilinx github2. configure qemu-system-arm without kvm and with flat device tree support./configure --target-li...
分类:
系统相关 时间:
2014-10-25 18:43:31
阅读次数:
219
题目大意:给定n个形如xi=ki*x_pi+bi mod p的同余方程组 支持修改操作和求解操作
确实好题 感谢此题作者 顺便吐槽一下作者的Splay不加空节点太蛋疼了0.0
将每个点i的父亲设为pi 我们将会得到一座基环树林 将环上的一条边拆掉,在边的起始节点新开个域special_father记录这条边(P.S:好浪费 但是没办法)
于是我们得到了一座森林 显然可以用LCT来维护 每个节...
分类:
其他好文 时间:
2014-10-25 09:20:13
阅读次数:
284
题目地址:Ural 1081
先用dp求出每个长度下的合法序列(开头为1)的个数。然后求前缀和。会发现正好是一个斐波那契数列。然后每次判断是否大于此时长度下的最少个数,若大于,说明这一位肯定是1,若小于,则肯定是0.就这样不断输出出来即可。
代码如下:
#include
#include
#include
#include
#include
#include
#include
...
分类:
其他好文 时间:
2014-10-24 23:40:46
阅读次数:
312
链接:
huangjing
题目:中文题目
思路:
这个题目如果去掉那个距离大于d的条件,那么必然是一个普通的LIS,但是加上那个条件后就变得复杂了。用dp的解法没有看懂,我用的线段树的解法。。。就是采用延迟更新的做法,用为距离要大于d啊,所以我们在循环到第i的时候,就对(i-d-1)这个点进行更新,因为如果在(i-d-1)这个点更新了,会对后面的造成影响,然后线段树的tree【】数...
分类:
其他好文 时间:
2014-10-24 23:38:55
阅读次数:
338
计划制作一个背单词的web应用,很不顺利的找到了资源,拿到的是.bak文件,导入到sqlserver倒是简单,现在我想把数据导到mongolab,遇到了一些坑,特地记录下来(老了,记不住啊)mongolab 支持binary,json,csv所以我将数据导出成.csv1.数据库--任务--导出数据2...
分类:
数据库 时间:
2014-10-24 20:24:52
阅读次数:
372
(1)android.app.Fragment:兼容的最低版本是android:minSdkVersion="11"
因此你的应用不能兼容3.0以下的应用。
可以使用标签的,这点很重要,如果是用android.support.v4.app.Fragment的话,是不能是用标签的,会抛出android.view.InflateException: Binary XML file line...
分类:
移动开发 时间:
2014-10-24 18:54:47
阅读次数:
142
问题描述:
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,
Given n = 3, there are a total of 5 unique BST's.
1 3 3 2...
分类:
其他好文 时间:
2014-10-24 16:33:10
阅读次数:
117
1.Link Binary With Libraries 中添加libz.dyllb2.复制OpenSSL(libssl.a & libcryto.a &NSData+CocoaDevUsersAdditions.h &NSData+CocoaDevUsersAdditions.m)到文件目录中,并...
分类:
其他好文 时间:
2014-10-24 16:03:05
阅读次数:
119
今早起来做 LeetCode,结果被这道题卡了将近1个半小时,忍着没有去搜答案,最后还是被我想出来了,而且直接一次AC,哈哈!现在在这里记录一下解题思路。原题:Givenn, generate all structurally uniqueBST's(binary search trees) t.....
分类:
其他好文 时间:
2014-10-24 15:57:21
阅读次数:
202